Merge pull request #17031 from adriensamson/fix-getopt

node-getopt: options can be boolean, string or string[]
This commit is contained in:
Yui
2017-06-11 21:46:10 -07:00
committed by GitHub
+5 -5
View File
@@ -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 {