mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-06 20:46:50 +08:00
21 lines
569 B
TypeScript
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;
|