1 | import { StrictValidator } from "typanion";
|
2 | import { GeneralOptionFlags, CommandOptionReturn, WithArity } from "./utils";
|
3 | export type ArrayFlags<T, Arity extends number = 1> = GeneralOptionFlags & {
|
4 | arity?: Arity;
|
5 | validator?: StrictValidator<unknown, Array<T>>;
|
6 | };
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare function Array<T extends {} = string, Arity extends number = 1>(descriptor: string, opts: ArrayFlags<T, Arity> & {
|
16 | required: true;
|
17 | }): CommandOptionReturn<Array<WithArity<T, Arity>>>;
|
18 | export declare function Array<T extends {} = string, Arity extends number = 1>(descriptor: string, opts?: ArrayFlags<T, Arity>): CommandOptionReturn<Array<WithArity<T, Arity>> | undefined>;
|
19 | export declare function Array<T extends {} = string, Arity extends number = 1>(descriptor: string, initialValue: Array<WithArity<string, Arity>>, opts?: Omit<ArrayFlags<T, Arity>, 'required'>): CommandOptionReturn<Array<WithArity<T, Arity>>>;
|