UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

9 lines 383 B
/** * Helper type to add one to a number type. * * From: https://stackoverflow.com/questions/54243431/typescript-increment-number-type */ export type Increment<N extends number> = [...Arr<N>, unknown]["length"] & number; type Arr<N extends number, T extends unknown[] = []> = T["length"] extends N ? T : Arr<N, [...T, unknown]>; export {}; //# sourceMappingURL=Increment.d.ts.map