Socket
Socket
Sign inDemoInstall

@types/yargs

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/yargs - npm Package Compare versions

Comparing version 6.6.0 to 8.0.0

yargs/LICENSE

71

yargs/index.d.ts

@@ -1,11 +0,19 @@

// Type definitions for yargs 6.6.0
// Type definitions for yargs 8.0
// Project: https://github.com/chevex/yargs
// Definitions by: Martin Poelstra <https://github.com/poelstra>, Mizunashi Mana <https://github.com/mizunashi-mana>, Jeffery Grajkowski <https://github.com/pushplay>, Jeff Kenney <https://github.com/jeffkenney>
// Definitions by: Martin Poelstra <https://github.com/poelstra>
// Mizunashi Mana <https://github.com/mizunashi-mana>
// Jeffery Grajkowski <https://github.com/pushplay>
// Jeff Kenney <https://github.com/jeffkenney>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// unified-signatures: Because there is useful information in the argument names of the overloaded signatures
// prefer-method-signature: Because it makes more sense for optional functions provided in options objects
/* tslint:disable:unified-signatures prefer-method-signature */
declare namespace yargs {
interface Argv {
argv: any;
(...args: any[]): any;
parse(...args: any[]): any;
argv: Arguments;
(args?: string[], cwd?: string): Arguments;
parse(args: string | string[], context?: object, parseCallback?: ParseCallback): Arguments;

@@ -21,5 +29,5 @@ reset(): Argv;

alias(shortName: string, longName: string): Argv;
alias(aliases: { [shortName: string]: string }): Argv;
alias(aliases: { [shortName: string]: string[] }): Argv;
alias(shortName: string, longName: string | string[]): Argv;
alias(shortNames: string[], longName: string): Argv;
alias(aliases: { [shortName: string]: string | string[] }): Argv;

@@ -72,3 +80,3 @@ array(key: string): Argv;

describe(key: string, description: string): Argv;
describe(key: string | string[], description: string): Argv;
describe(descriptions: { [key: string]: string }): Argv;

@@ -87,4 +95,4 @@

command(command: string, description: string, builder: { [optionName: string]: Options }): Argv;
command(command: string, description: string, builder: { [optionName: string]: Options }, handler: (args: any) => void): Argv;
command(command: string, description: string, builder: (args: Argv) => Argv, handler: (args: any) => void): Argv;
command(command: string, description: string, builder: { [optionName: string]: Options }, handler: (args: Arguments) => void): Argv;
command(command: string, description: string, builder: (args: Argv) => Argv, handler: (args: Arguments) => void): Argv;
command(command: string, description: string, module: CommandModule): Argv;

@@ -103,3 +111,3 @@ command(module: CommandModule): Argv;

check(func: (argv: any, aliases: { [alias: string]: string }) => any): Argv;
check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any): Argv;

@@ -115,11 +123,11 @@ boolean(key: string): Argv;

choices(choices: Object): Argv;
choices(key: string, values: any[]): Argv;
choices(choices: { [argName: string]: Choices }): Argv;
choices(key: string, values: Choices): Argv;
config(): Argv;
config(explicitConfigurationObject: Object): Argv;
config(key: string, description?: string, parseFn?: (configPath: string) => Object): Argv;
config(keys: string[], description?: string, parseFn?: (configPath: string) => Object): Argv;
config(key: string, parseFn: (configPath: string) => Object): Argv;
config(keys: string[], parseFn: (configPath: string) => Object): Argv;
config(explicitConfigurationObject: object): Argv;
config(key: string, description?: string, parseFn?: (configPath: string) => object): Argv;
config(keys: string[], description?: string, parseFn?: (configPath: string) => object): Argv;
config(key: string, parseFn: (configPath: string) => object): Argv;
config(keys: string[], parseFn: (configPath: string) => object): Argv;

@@ -188,7 +196,17 @@ conflicts(key: string, value: string): Argv;

updateLocale(obj: Object): Argv;
updateLocale(obj: { [key: string]: string }): Argv;
updateStrings(obj: {[key: string]: string}): Argv;
updateStrings(obj: { [key: string]: string }): Argv;
}
interface Arguments {
/** Non-option arguments */
_: string[];
/** The script name or node command */
$0: string;
/** All remaining options */
[ argName: string ]: any;
}
interface RequireDirectoryOptions {

@@ -206,6 +224,7 @@ recurse?: boolean;

boolean?: boolean;
choices?: string[];
choices?: Choices;
coerce?: (arg: any) => any;
config?: boolean;
configParser?: (configPath: string) => Object;
configParser?: (configPath: string) => object;
conflicts?: string | object;
count?: boolean;

@@ -222,2 +241,3 @@ default?: any;

group?: string;
implies?: string | object;
nargs?: number;

@@ -242,5 +262,8 @@ normalize?: boolean;

type CommandBuilder = {[key: string]: Options} | ((args: Argv) => Argv);
type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void;
type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv);
type SyncCompletionFunction = (current: string, argv: any) => string[];
type AsyncCompletionFunction = (current: string, argv: any, done: (completion: string[]) => void) => void;
type Choice = string | true | undefined;
type Choices = Choice[];
}

@@ -247,0 +270,0 @@

{
"name": "@types/yargs",
"version": "6.6.0",
"version": "8.0.0",
"description": "TypeScript definitions for yargs",
"license": "MIT",
"author": "Martin Poelstra <https://github.com/poelstra>, Mizunashi Mana <https://github.com/mizunashi-mana>, Jeffery Grajkowski <https://github.com/pushplay>, Jeff Kenney <https://github.com/jeffkenney>",
"contributors": [
{
"name": "Martin Poelstra",
"url": "https://github.com/poelstra"
},
{
"name": "Mizunashi Mana",
"url": "https://github.com/mizunashi-mana"
},
{
"name": "Jeffery Grajkowski",
"url": "https://github.com/pushplay"
},
{
"name": "Jeff Kenney",
"url": "https://github.com/jeffkenney"
}
],
"main": "",

@@ -15,4 +32,4 @@ "repository": {

"peerDependencies": {},
"typesPublisherContentHash": "9b79b82e6860eb01d6ac04eb73af8ddb6a1a6dd62caf985caee6f441ec6466ab",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "71e333d1890d3635ff8d8fa07a03e2a999b5ddc8983c259e7ca901eddbe025e8",
"typeScriptVersion": "2.2"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/yargs
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
Additional Details
* Last updated: Tue, 07 Feb 2017 20:53:03 GMT
* Last updated: Fri, 30 Jun 2017 21:28:46 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc