@types/yargs-parser
TypeScript definitions for yargs-parser
Last updated 4 years ago by types .
MIT · Repository · Original npm
$ cnpm install @types/yargs-parser 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/yargs-parser

Summary

This package contains type definitions for yargs-parser (https://github.com/yargs/yargs-parser#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser/v11.

index.d.ts

// Type definitions for yargs-parser 11.0
// Project: https://github.com/yargs/yargs-parser#readme
// Definitions by: Miles Johnson <https://github.com/milesj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

declare namespace yargsParser {
    interface Arguments {
        /** Non-option arguments */
        _: string[];
        /** The script name or node command */
        $0: string;
        /** All remaining options */
        [argName: string]: any;
    }

    interface DetailedArguments {
        argv: Arguments;
        error: Error | null;
        aliases: { [alias: string]: string[] };
        newAliases: { [alias: string]: boolean };
        configuration: Configuration;
    }

    interface Configuration {
        'boolean-negation': boolean;
        'camel-case-expansion': boolean;
        'combine-arrays': boolean;
        'dot-notation': boolean;
        'duplicate-arguments-array': boolean;
        'flatten-duplicate-arrays': boolean;
        'negation-prefix': string;
        'parse-numbers': boolean;
        'populate--': boolean;
        'set-placeholder-key': boolean;
        'short-option-groups': boolean;
    }

    interface Options {
        alias?: { [key: string]: string | string[] } | undefined;
        array?: string[] | undefined;
        boolean?: string[] | undefined;
        config?: string | string[] | { [key: string]: boolean } | undefined;
        configuration?: Partial<Configuration> | undefined;
        coerce?: { [key: string]: (arg: any) => any } | undefined;
        count?: string[] | undefined;
        default?: { [key: string]: any } | undefined;
        envPrefix?: string | undefined;
        narg?: { [key: string]: number } | undefined;
        normalize?: string[] | undefined;
        string?: string[] | undefined;
        number?: string[] | undefined;
        '--'?: boolean | undefined;
    }

    interface Parser {
        (argv: string | string[], opts?: Options): Arguments;
        detailed(argv: string | string[], opts?: Options): DetailedArguments;
    }
}

declare var yargsParser: yargsParser.Parser;
export = yargsParser;

Additional Details

  • Last updated: Fri, 02 Jul 2021 16:32:07 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Miles Johnson.

Current Tags

  • 21.0.0                                ...           latest (3 years ago)
  • 15.0.0                                ...           ts2.8 (6 years ago)
  • 15.0.0                                ...           ts2.9 (6 years ago)
  • 15.0.0                                ...           ts3.0 (6 years ago)
  • 15.0.0                                ...           ts3.1 (6 years ago)
  • 15.0.0                                ...           ts3.2 (6 years ago)
  • 20.2.0                                ...           ts3.3 (5 years ago)
  • 20.2.0                                ...           ts3.4 (5 years ago)
  • 20.2.0                                ...           ts3.5 (5 years ago)
  • 20.2.1                                ...           ts3.6 (4 years ago)
  • 20.2.1                                ...           ts3.7 (4 years ago)
  • 20.2.1                                ...           ts3.8 (4 years ago)
  • 21.0.0                                ...           ts3.9 (3 years ago)
  • 21.0.0                                ...           ts4.0 (3 years ago)

5 Versions

  • 21.0.0                                ...           3 years ago
  • 20.2.1                                ...           4 years ago
  • 20.2.0                                ...           5 years ago
  • 13.1.0                                ...           6 years ago
  • 15.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org