node-getopt: options can be boolean, string or string[]

This commit is contained in:
Adrien Samson
2017-06-07 16:48:07 +02:00
parent f7636dec13
commit 36fc5f5e5c

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 {