add type bindings to minimist (for #83421)
This commit is contained in:
parent
6d66ce848e
commit
c1997dcd4b
5 changed files with 10 additions and 102 deletions
|
@ -47,7 +47,7 @@
|
||||||
"spdlog": "^0.11.1",
|
"spdlog": "^0.11.1",
|
||||||
"sudo-prompt": "9.1.0",
|
"sudo-prompt": "9.1.0",
|
||||||
"v8-inspect-profiler": "^0.0.20",
|
"v8-inspect-profiler": "^0.0.20",
|
||||||
"vscode-minimist": "^1.2.1",
|
"vscode-minimist": "^1.2.2",
|
||||||
"vscode-nsfw": "1.2.8",
|
"vscode-nsfw": "1.2.8",
|
||||||
"vscode-proxy-agent": "^0.5.2",
|
"vscode-proxy-agent": "^0.5.2",
|
||||||
"vscode-ripgrep": "^1.5.7",
|
"vscode-ripgrep": "^1.5.7",
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"onigasm-umd": "^2.2.4",
|
"onigasm-umd": "^2.2.4",
|
||||||
"semver-umd": "^5.5.3",
|
"semver-umd": "^5.5.3",
|
||||||
"spdlog": "^0.11.1",
|
"spdlog": "^0.11.1",
|
||||||
"vscode-minimist": "^1.2.1",
|
"vscode-minimist": "^1.2.2",
|
||||||
"vscode-nsfw": "1.2.8",
|
"vscode-nsfw": "1.2.8",
|
||||||
"vscode-proxy-agent": "^0.5.2",
|
"vscode-proxy-agent": "^0.5.2",
|
||||||
"vscode-ripgrep": "^1.5.7",
|
"vscode-ripgrep": "^1.5.7",
|
||||||
|
|
|
@ -369,10 +369,10 @@ universalify@^0.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||||
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||||
|
|
||||||
vscode-minimist@^1.2.1:
|
vscode-minimist@^1.2.2:
|
||||||
version "1.2.1"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-minimist/-/vscode-minimist-1.2.1.tgz#e63d3f4a9bf3680dcb8f9304eed612323fd6926a"
|
resolved "https://registry.yarnpkg.com/vscode-minimist/-/vscode-minimist-1.2.2.tgz#65403f44f0c6010d259b2271d36eb5c6f4ad8aab"
|
||||||
integrity sha512-cmB72+qDoiCFJ1UKnGUBdGYfXzdpJ3bQM/D/+XhkVk5v7uZgLbYiCz5JcwVyk7NC7hSi5VGtQ4wihzmi12NeXw==
|
integrity sha512-DXMNG2QgrXn1jOP12LzjVfvxVkzxv/0Qa27JrMBj/XP2esj+fJ/wP2T4YUH5derj73Lc96dC8F25WyfDUbTpxQ==
|
||||||
|
|
||||||
vscode-nsfw@1.2.8:
|
vscode-nsfw@1.2.8:
|
||||||
version "1.2.8"
|
version "1.2.8"
|
||||||
|
|
92
src/typings/vscode-minimist.d.ts
vendored
92
src/typings/vscode-minimist.d.ts
vendored
|
@ -1,92 +0,0 @@
|
||||||
// Type definitions for minimist 1.2.0
|
|
||||||
// Project: https://github.com/substack/minimist
|
|
||||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>, kamranayub <https://github.com/kamranayub>
|
|
||||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return an argument object populated with the array arguments from args
|
|
||||||
*
|
|
||||||
* @param args An optional argument array (typically `process.argv.slice(2)`)
|
|
||||||
* @param opts An optional options object to customize the parsing
|
|
||||||
*/
|
|
||||||
declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return an argument object populated with the array arguments from args. Strongly-typed
|
|
||||||
* to be the intersect of type T with minimist.ParsedArgs.
|
|
||||||
*
|
|
||||||
* @type T The type that will be intersected with minimist.ParsedArgs to represent the argument object
|
|
||||||
* @param args An optional argument array (typically `process.argv.slice(2)`)
|
|
||||||
* @param opts An optional options object to customize the parsing
|
|
||||||
*/
|
|
||||||
declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return an argument object populated with the array arguments from args. Strongly-typed
|
|
||||||
* to be the the type T which should extend minimist.ParsedArgs
|
|
||||||
*
|
|
||||||
* @type T The type that extends minimist.ParsedArgs and represents the argument object
|
|
||||||
* @param args An optional argument array (typically `process.argv.slice(2)`)
|
|
||||||
* @param opts An optional options object to customize the parsing
|
|
||||||
*/
|
|
||||||
declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
|
|
||||||
|
|
||||||
declare namespace minimist {
|
|
||||||
export interface Opts {
|
|
||||||
/**
|
|
||||||
* A string or array of strings argument names to always treat as strings
|
|
||||||
*/
|
|
||||||
string?: string | string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A boolean, string or array of strings to always treat as booleans. If true will treat
|
|
||||||
* all double hyphenated arguments without equals signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
|
|
||||||
*/
|
|
||||||
boolean?: boolean | string | string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object mapping string names to strings or arrays of string argument names to use as aliases
|
|
||||||
*/
|
|
||||||
alias?: { [key: string]: string | string[] };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object mapping string argument names to default values
|
|
||||||
*/
|
|
||||||
default?: { [key: string]: any };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When true, populate argv._ with everything after the first non-option
|
|
||||||
*/
|
|
||||||
stopEarly?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A function which is invoked with a command line parameter not defined in the opts
|
|
||||||
* configuration object. If the function returns false, the unknown option is not added to argv
|
|
||||||
*/
|
|
||||||
unknown?: (arg: string) => boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When true, populate argv._ with everything before the -- and argv['--'] with everything after the --.
|
|
||||||
* Note that with -- set, parsing for arguments still stops after the `--`.
|
|
||||||
*/
|
|
||||||
'--'?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ParsedArgs {
|
|
||||||
[arg: string]: any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If opts['--'] is true, populated with everything after the --
|
|
||||||
*/
|
|
||||||
'--'?: string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains all the arguments that didn't have an option associated with them
|
|
||||||
*/
|
|
||||||
_: string[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module "vscode-minimist" {
|
|
||||||
export = minimist;
|
|
||||||
}
|
|
|
@ -9017,10 +9017,10 @@ vscode-debugprotocol@1.37.0:
|
||||||
resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.37.0.tgz#e8c4694a078d18ea1a639553a7a241b35c1e6f6d"
|
resolved "https://registry.yarnpkg.com/vscode-debugprotocol/-/vscode-debugprotocol-1.37.0.tgz#e8c4694a078d18ea1a639553a7a241b35c1e6f6d"
|
||||||
integrity sha512-ppZLEBbFRVNsK0YpfgFi/x2CDyihx0F+UpdKmgeJcvi05UgSXYdO0n9sDVYwoGvvYQPvlpDQeWuY0nloOC4mPA==
|
integrity sha512-ppZLEBbFRVNsK0YpfgFi/x2CDyihx0F+UpdKmgeJcvi05UgSXYdO0n9sDVYwoGvvYQPvlpDQeWuY0nloOC4mPA==
|
||||||
|
|
||||||
vscode-minimist@^1.2.1:
|
vscode-minimist@^1.2.2:
|
||||||
version "1.2.1"
|
version "1.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-minimist/-/vscode-minimist-1.2.1.tgz#e63d3f4a9bf3680dcb8f9304eed612323fd6926a"
|
resolved "https://registry.yarnpkg.com/vscode-minimist/-/vscode-minimist-1.2.2.tgz#65403f44f0c6010d259b2271d36eb5c6f4ad8aab"
|
||||||
integrity sha512-cmB72+qDoiCFJ1UKnGUBdGYfXzdpJ3bQM/D/+XhkVk5v7uZgLbYiCz5JcwVyk7NC7hSi5VGtQ4wihzmi12NeXw==
|
integrity sha512-DXMNG2QgrXn1jOP12LzjVfvxVkzxv/0Qa27JrMBj/XP2esj+fJ/wP2T4YUH5derj73Lc96dC8F25WyfDUbTpxQ==
|
||||||
|
|
||||||
vscode-nls-dev@^3.3.1:
|
vscode-nls-dev@^3.3.1:
|
||||||
version "3.3.1"
|
version "3.3.1"
|
||||||
|
|
Loading…
Reference in a new issue