UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

11 lines 478 B
import type { IRange } from "./IRange"; /** * Helper type that validates that a tuple has a length between `MinLength` and `MaxLength` * (inclusive on both ends). * * For example, `TupleWithLengthBetween<string, 2, 4>` will allow string tuples of size 2, 3, or 4. */ export type TupleWithLengthBetween<T, MinLength extends number, MaxLength extends number> = readonly T[] & { length: IRange<MinLength, MaxLength>; }; //# sourceMappingURL=TupleWithLengthBetween.d.ts.map