-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,34 @@ | ||
export declare type Options = { options: any; argv: string[] }; | ||
export declare type Config = { | ||
noAliasPropagation?: boolean; | ||
noCamelCase?: boolean; | ||
noBundling?: boolean; | ||
ignoreEquals?: boolean; | ||
duplicates?: | ||
| "use-first" | ||
| "use-last" | ||
| "limit-first" | ||
| "limit-last" | ||
| "error" | ||
| "append" | ||
| "stack" | ||
| "stack-values"; | ||
}; | ||
export declare function getOpts( | ||
// Import the function like | ||
// import getOpts = require('get-options'); | ||
// If you need the types you can import them like normal | ||
// import { Options } from 'get-options'; | ||
|
||
/** | ||
* Extract command-line options from a list of strings. | ||
*/ | ||
declare function getOpts( | ||
input: any[], | ||
optdef: string | { [key: string]: string }, | ||
config: Config | ||
): Options; | ||
optdef?: string | { [key: string]: string }, | ||
config?: getOpts.Config | ||
): getOpts.Options; | ||
|
||
export = getOpts; | ||
|
||
export default getOpts; | ||
declare namespace getOpts { | ||
export type Options = { options: any; argv: string[] }; | ||
export type Config = { | ||
noAliasPropagation?: boolean | "first-only"; | ||
noCamelCase?: boolean; | ||
noBundling?: boolean; | ||
ignoreEquals?: boolean; | ||
duplicates?: | ||
| "use-first" | ||
| "use-last" | ||
| "limit-first" | ||
| "limit-last" | ||
| "error" | ||
| "append" | ||
| "stack" | ||
| "stack-values"; | ||
}; | ||
} |
Empty file.