1 | import { Next } from '../Iteration/Next';
|
2 | import { Prepend } from './Prepend';
|
3 | import { IterationOf } from '../Iteration/IterationOf';
|
4 | import { Iteration } from '../Iteration/Iteration';
|
5 | import { Cast } from '../Any/Cast';
|
6 | import { List } from './List';
|
7 | import { Extends } from '../Any/Extends';
|
8 | import { Pos } from '../Iteration/Pos';
|
9 |
|
10 |
|
11 |
|
12 | declare type __Repeat<N extends number, A, L extends List = [], I extends Iteration = IterationOf<0>> = {
|
13 | 0: __Repeat<N, A, Prepend<L, A>, Next<I>>;
|
14 | 1: L;
|
15 | }[Extends<Pos<I>, N>];
|
16 |
|
17 |
|
18 |
|
19 | export declare type _Repeat<A extends any, N extends number, L extends List = []> = __Repeat<N, A, L> extends infer X ? Cast<X, List> : never;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export declare type Repeat<A extends any, N extends number, L extends List = []> = N extends unknown ? L extends unknown ? _Repeat<A, N, L> : never : never;
|
31 | export {};
|