Add types for commander-remaining-args (#36148)

This commit is contained in:
Florian Keller
2019-06-20 23:01:52 +02:00
committed by Daniel Rosenwasser
parent a513c86074
commit 8deb2a8c32
5 changed files with 49 additions and 0 deletions

View File

@@ -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'])

View 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;

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"commander": "^2.20.0"
}
}

View 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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }