mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Add types for commander-remaining-args (#36148)
This commit is contained in:
committed by
Daniel Rosenwasser
parent
a513c86074
commit
8deb2a8c32
@@ -0,0 +1,6 @@
|
||||
import cli = require('commander');
|
||||
import getRemainingArgs = require('commander-remaining-args');
|
||||
|
||||
cli.allowUnknownOption().option('--some-flag');
|
||||
|
||||
getRemainingArgs(cli); // ['--unknown-flag', '--unknown-arg=value', '-x'])
|
||||
13
types/commander-remaining-args/index.d.ts
vendored
Normal file
13
types/commander-remaining-args/index.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// Type definitions for commander-remaining-args 1.2
|
||||
// Project: https://github.com/axelchalon/commander-remaining-args#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Command } from 'commander';
|
||||
|
||||
declare function getRemainingArgs(cli: Command): string[];
|
||||
|
||||
export = getRemainingArgs;
|
||||
6
types/commander-remaining-args/package.json
Normal file
6
types/commander-remaining-args/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"commander": "^2.20.0"
|
||||
}
|
||||
}
|
||||
23
types/commander-remaining-args/tsconfig.json
Normal file
23
types/commander-remaining-args/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"commander-remaining-args-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/commander-remaining-args/tslint.json
Normal file
1
types/commander-remaining-args/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user