UNPKG

typedash

Version:

modern, type-safe collection of utility functions

13 lines 404 B
//#region src/types/Many.d.ts type MutableMany<T> = T | T[]; type ImmutableMany<T> = T | readonly T[]; /** * Represents a value that can be either a single value or an array of values. */ type Many<T, Type extends 'mutable' | 'immutable' = 'immutable'> = { immutable: ImmutableMany<T>; mutable: MutableMany<T>; }[Type]; //#endregion export { Many as t }; //# sourceMappingURL=Many-CC3hL8UU.d.ts.map