UNPKG

type-plus

Version:
5 lines 461 B
import type { CanAssign } from '../index.js'; import type { CreateTuple } from '../tuple/create_tuple.js'; import type { UnionOfValues } from './union_of_values.js'; export type PadStart<A extends unknown[], MaxLength extends number, PadWith = unknown> = MaxLength extends 0 ? A : CanAssign<PadWith, UnionOfValues<A>> extends true ? A : PadStart<[...CreateTuple<MaxLength, PadWith>, ...A], MaxLength, PadWith>; //# sourceMappingURL=array_plus.pad_start.d.ts.map