UNPKG

811 BTypeScriptView Raw
1export interface Config {
2 [key: string]: {
3 key?: string;
4 description?: string;
5 multiple?: boolean;
6 args?: number | string;
7 mandatory?: boolean;
8 required?: boolean;
9 default?: string | string[] | boolean;
10 maxArgs?: number;
11 minArgs?: number;
12 } | boolean | undefined;
13}
14export interface Options {
15 exitOnFailure?: boolean;
16 throwOnFailure?: boolean;
17 printOnFailure?: boolean;
18}
19export interface GetoptPartialResponse {
20 [key: string]: Array<string | boolean>;
21}
22export interface GetoptResponse {
23 [key: string]: string | number | boolean | Array<string | number | boolean>;
24}
25declare const _default: (config: Config, command?: string[], options?: Options | undefined) => GetoptResponse | null;
26export default _default;