mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
node-getopt: options can be boolean, string or string[]
This commit is contained in:
10
types/node-getopt/index.d.ts
vendored
10
types/node-getopt/index.d.ts
vendored
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
|
||||
|
||||
interface StringMap {
|
||||
[index: string]: string;
|
||||
interface OptionMap {
|
||||
[index: string]: string | string[] | boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -17,14 +17,14 @@ interface StringMap {
|
||||
*/
|
||||
declare class ParsedOption {
|
||||
public argv: string[];
|
||||
public options: StringMap;
|
||||
public options: OptionMap;
|
||||
|
||||
constructor(argv: string[], options: StringMap);
|
||||
constructor(argv: string[], options: OptionMap);
|
||||
public empty(): boolean;
|
||||
}
|
||||
|
||||
interface EventCallback {
|
||||
(args: string[], options: StringMap): void;
|
||||
(args: string[], options: OptionMap): void;
|
||||
}
|
||||
|
||||
interface ErrorFunc {
|
||||
|
||||
Reference in New Issue
Block a user