1 | declare namespace fill {
|
2 | interface Options<ValueType, TransformValueType> {
|
3 | step?: number;
|
4 | strictRanges?: boolean;
|
5 | stringify?: boolean;
|
6 | toRegex?: boolean;
|
7 | transform?: (value: ValueType) => TransformValueType;
|
8 | }
|
9 | }
|
10 |
|
11 | type FilledArray<ValueType, TransformValueType> = ValueType extends TransformValueType ? ValueType[]
|
12 | : TransformValueType[];
|
13 |
|
14 | declare function fill<
|
15 | ValueType = string | number,
|
16 | TransformValueType = unknown,
|
17 | >(
|
18 | start: ValueType,
|
19 | end?: ValueType | null,
|
20 | step?: number,
|
21 | options?: fill.Options<ValueType, TransformValueType>,
|
22 | ): FilledArray<ValueType, TransformValueType>;
|
23 |
|
24 | declare function fill<
|
25 | ValueType = string | number,
|
26 | TransformValueType = unknown,
|
27 | >(
|
28 | start: ValueType,
|
29 | end?: ValueType | null,
|
30 | transformOrOptions?:
|
31 | | fill.Options<ValueType, TransformValueType>["transform"]
|
32 | | fill.Options<ValueType, TransformValueType>,
|
33 | ): FilledArray<ValueType, TransformValueType>;
|
34 |
|
35 | export = fill;
|