mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-14 01:24:26 +00:00
string-argv: Provides its own types (#39551)
This commit is contained in:
committed by
Jesse Trinity
parent
4d3d1c935e
commit
ca564417e2
@@ -3912,6 +3912,12 @@
|
||||
"sourceRepoURL": "https://github.com/b4nst/stream-mock",
|
||||
"asOfVersion": "2.0.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "string-argv",
|
||||
"typingsPackageName": "string-argv",
|
||||
"sourceRepoURL": "https://github.com/mccormicka/string-argv",
|
||||
"asOfVersion": "0.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "string-length",
|
||||
"typingsPackageName": "string-length",
|
||||
|
||||
18
types/string-argv/index.d.ts
vendored
18
types/string-argv/index.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
// Type definitions for string-argv 0.1
|
||||
// Project: https://github.com/mccormicka/string-argv
|
||||
// Definitions by: Vladimir Tikhonov <https://github.com/vladimir-tikhonov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = parseArgsStringToArgv;
|
||||
|
||||
/**
|
||||
* Parses a string into an argument array to mimic `process.argv`.
|
||||
* @param value - Arguments that you would normally pass to the command line.
|
||||
* @param [env] - Adds to the environment position in the argv array.
|
||||
* If ommitted then there is no need to call argv.split(2) to remove the environment/file values.
|
||||
* However if your cli.parse method expects a valid argv value then you should include this value.
|
||||
* @param [file] - File that called the arguments.
|
||||
* If omitted then there is no need to call argv.split(2) to remove the environment/file values.
|
||||
* However if your cli.parse method expects a valid argv value then you should include this value.
|
||||
*/
|
||||
declare function parseArgsStringToArgv(value: string, env?: string, file?: string): string[];
|
||||
@@ -1,5 +0,0 @@
|
||||
import parseArgsStringToArgv = require("string-argv");
|
||||
|
||||
const commandOnly = parseArgsStringToArgv("-test"); // $ExpectType string[]
|
||||
const commandAndEnv = parseArgsStringToArgv("-test", "node"); // $ExpectType string[]
|
||||
const commandEnvAndFile = parseArgsStringToArgv("-test", "node", "testing.js"); // $ExpectType string[]
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"string-argv-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user