Socket
Socket
Sign inDemoInstall

@types/minimist

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.29 to 1.2.0

80

minimist/index.d.ts

@@ -1,25 +0,72 @@

// Type definitions for minimist 1.1.3
// 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>
// 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
/**
* A string or array of strings argument names to always treat as strings
*/
string?: string | string[];
// a string or array of strings to always treat as booleans
/**
* 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
/**
* 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
/**
* An object mapping string argument names to default values
*/
default?: { [key: string]: any };
// when true, populate argv._ with everything after the first non-option
/**
* 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
/**
* 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 --
/**
* 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;

@@ -30,3 +77,12 @@ }

[arg: string]: any;
_: string[];
/**
* If opts['--'] is true, populated with everything after the --
*/
'--'?: string[];
/**
* Contains all the arguments that didn't have an option associated with them
*/
_: string[];
}

@@ -33,0 +89,0 @@ }

11

minimist/package.json
{
"name": "@types/minimist",
"version": "1.1.29",
"description": "TypeScript definitions for minimist 1.1.3",
"version": "1.2.0",
"description": "TypeScript definitions for minimist",
"license": "MIT",
"author": "Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>",
"author": "Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>, kamranayub <https://github.com/kamranayub>",
"main": "",

@@ -14,4 +14,5 @@ "repository": {

"dependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "7bd76d5d00da30cd3438987c7e937fa536f22d8464348e0e391d6b13934cccf8"
"peerDependencies": {},
"typesPublisherContentHash": "46fbb5db5555175c72b64f17adce05fa9f0b38683361f762134fc47aea2ac195",
"typeScriptVersion": "2.0"
}

@@ -5,15 +5,14 @@ # Installation

# Summary
This package contains type definitions for minimist 1.1.3 (https://github.com/substack/minimist).
This package contains type definitions for minimist (https://github.com/substack/minimist).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/minimist
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/minimist
Additional Details
* Last updated: Mon, 19 Sep 2016 17:28:59 GMT
* File structure: ProperModule
* Last updated: Thu, 29 Dec 2016 23:09:09 GMT
* Library Dependencies: none
* Module Dependencies: none
* Global values: minimist
* Global values: none
# Credits
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>.
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>, kamranayub <https://github.com/kamranayub>.
{
"authors": "Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>",
"definitionFilename": "index.d.ts",
"authors": "Bart van der Schoor <https://github.com/Bartvds>, Necroskillz <https://github.com/Necroskillz>, kamranayub <https://github.com/kamranayub>",
"libraryDependencies": [],
"moduleDependencies": [],
"libraryMajorVersion": "1",
"libraryMinorVersion": "1",
"libraryName": "minimist 1.1.3",
"libraryMajorVersion": 1,
"libraryMinorVersion": 2,
"typeScriptVersion": "2.0",
"libraryName": "minimist",
"typingsPackageName": "minimist",
"projectName": "https://github.com/substack/minimist",
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "ProperModule",
"globals": [
"minimist"
],
"sourceBranch": "master",
"globals": [],
"declaredModules": [

@@ -24,3 +21,3 @@ "minimist"

"hasPackageJson": false,
"contentHash": "7bd76d5d00da30cd3438987c7e937fa536f22d8464348e0e391d6b13934cccf8"
"contentHash": "46fbb5db5555175c72b64f17adce05fa9f0b38683361f762134fc47aea2ac195"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc