Files
DefinitelyTyped/types/getopts/index.d.ts
2018-02-16 16:30:32 +01:00

21 lines
569 B
TypeScript

// Type definitions for getopts 2.0
// Project: https://github.com/getopts/getopts#readme
// Definitions by: Aleh Zasypkin <https://github.com/azasypkin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ParsedOptions {
_: string[];
[key: string]: any;
}
interface Options {
alias?: { [key: string]: string | string[] };
boolean?: string[];
default?: { [key: string]: any };
unknown?: (optionName: string) => boolean;
}
declare function getopts(argv: string[], options?: Options): ParsedOptions;
export = getopts;