@types/argparse

  • Version 2.0.10
  • Published
  • 8.57 kB
  • No dependencies
  • MIT license

Install

npm i @types/argparse
yarn add @types/argparse
pnpm add @types/argparse

Overview

TypeScript definitions for argparse

Index

Variables

variable ONE_OR_MORE

const ONE_OR_MORE: string;

    variable OPTIONAL

    const OPTIONAL: string;

      variable PARSER

      const PARSER: string;

        variable REMAINDER

        const REMAINDER: string;

          variable SUPPRESS

          const SUPPRESS: string;

            variable ZERO_OR_MORE

            const ZERO_OR_MORE: string;

              Classes

              class Action

              abstract class Action {}

                constructor

                constructor(options: Number & { _: 'ActionConstructorOptions' });

                  property dest

                  protected dest: string;

                    method call

                    abstract call: (
                    parser: ArgumentParser,
                    namespace: Namespace,
                    values: string | string[],
                    optionString: string | null
                    ) => void;

                      class ArgumentDefaultsHelpFormatter

                      class ArgumentDefaultsHelpFormatter {}

                        class ArgumentError

                        class ArgumentError extends Error {}

                          constructor

                          constructor(argument: Action, message: string);

                            method str

                            str: () => string;

                              class ArgumentGroup

                              class ArgumentGroup {}

                                method add_argument

                                add_argument: {
                                (arg: string, options?: ArgumentOptions): void;
                                (arg1: string, arg2: string, options?: ArgumentOptions): void;
                                };

                                  method add_argument_group

                                  add_argument_group: (options?: ArgumentGroupOptions) => ArgumentGroup;

                                    method add_mutually_exclusive_group

                                    add_mutually_exclusive_group: (options?: { required: boolean }) => ArgumentGroup;

                                      method get_default

                                      get_default: (dest: string) => any;

                                        method set_defaults

                                        set_defaults: (options?: {}) => void;

                                          class ArgumentParser

                                          class ArgumentParser extends ArgumentGroup {}

                                            constructor

                                            constructor(options?: ArgumentParserOptions);

                                              method add_subparsers

                                              add_subparsers: (options?: SubparserOptions) => SubParser;

                                                method convert_arg_line_to_args

                                                convert_arg_line_to_args: (argLine: string) => string[];

                                                  method error

                                                  error: (err: string | Error) => void;

                                                    method exit

                                                    exit: (status: number, message: string) => void;

                                                      method format_help

                                                      format_help: () => string;

                                                        method format_usage

                                                        format_usage: () => string;

                                                          method parse_args

                                                          parse_args: (args?: string[], ns?: Namespace | object) => any;

                                                            method parse_known_args

                                                            parse_known_args: (args?: string[], ns?: Namespace | object) => any[];

                                                              method print_help

                                                              print_help: () => void;

                                                                method print_usage

                                                                print_usage: () => void;

                                                                  class ArgumentTypeError

                                                                  class ArgumentTypeError extends Error {}

                                                                    constructor

                                                                    constructor(message: string);

                                                                      class BooleanOptionalAction

                                                                      class BooleanOptionalAction extends Action {}

                                                                        method call

                                                                        call: (
                                                                        parser: ArgumentParser,
                                                                        namespace: Namespace,
                                                                        values: string | string[],
                                                                        optionString: string | null
                                                                        ) => void;

                                                                          class HelpFormatter

                                                                          class HelpFormatter {}

                                                                            class Namespace

                                                                            class Namespace {}

                                                                              constructor

                                                                              constructor(options: {});

                                                                                class RawDescriptionHelpFormatter

                                                                                class RawDescriptionHelpFormatter {}

                                                                                  class RawTextHelpFormatter

                                                                                  class RawTextHelpFormatter {}

                                                                                    class SubParser

                                                                                    class SubParser {}

                                                                                      method add_parser

                                                                                      add_parser: (name: string, options?: SubArgumentParserOptions) => ArgumentParser;

                                                                                        Interfaces

                                                                                        interface ArgumentGroupOptions

                                                                                        interface ArgumentGroupOptions {}

                                                                                          property argument_default

                                                                                          argument_default?: any;

                                                                                            property description

                                                                                            description?: string | undefined;

                                                                                              property prefix_chars

                                                                                              prefix_chars?: string | undefined;

                                                                                                property title

                                                                                                title?: string | undefined;

                                                                                                  interface ArgumentOptions

                                                                                                  interface ArgumentOptions {}

                                                                                                    property action

                                                                                                    action?:
                                                                                                    | string
                                                                                                    | { new (options: ActionConstructorOptions): Action }
                                                                                                    | undefined;

                                                                                                      property choices

                                                                                                      choices?: string | string[] | undefined;

                                                                                                        property const

                                                                                                        const?: any;

                                                                                                          property default

                                                                                                          default?: any;

                                                                                                            property dest

                                                                                                            dest?: string | undefined;

                                                                                                              property help

                                                                                                              help?: string | undefined;

                                                                                                                property metavar

                                                                                                                metavar?: string | string[] | undefined;

                                                                                                                  property nargs

                                                                                                                  nargs?: string | number | undefined;

                                                                                                                    property option_strings

                                                                                                                    option_strings?: string[] | undefined;

                                                                                                                      property required

                                                                                                                      required?: boolean | undefined;

                                                                                                                        property type

                                                                                                                        type?: string | Function | undefined;

                                                                                                                          property version

                                                                                                                          version?: string | undefined;

                                                                                                                            interface ArgumentParserOptions

                                                                                                                            interface ArgumentParserOptions {}

                                                                                                                              property add_help

                                                                                                                              add_help?: boolean | undefined;

                                                                                                                                property argument_default

                                                                                                                                argument_default?: any;

                                                                                                                                  property description

                                                                                                                                  description?: string | undefined;

                                                                                                                                    property epilog

                                                                                                                                    epilog?: string | undefined;

                                                                                                                                      property exit_on_error

                                                                                                                                      exit_on_error?: boolean | undefined;

                                                                                                                                        property formatter_class

                                                                                                                                        formatter_class?:
                                                                                                                                        | {
                                                                                                                                        new ():
                                                                                                                                        | HelpFormatter
                                                                                                                                        | ArgumentDefaultsHelpFormatter
                                                                                                                                        | RawDescriptionHelpFormatter
                                                                                                                                        | RawTextHelpFormatter;
                                                                                                                                        }
                                                                                                                                        | undefined;

                                                                                                                                          property parents

                                                                                                                                          parents?: ArgumentParser[] | undefined;

                                                                                                                                            property prefix_chars

                                                                                                                                            prefix_chars?: string | undefined;

                                                                                                                                              property prog

                                                                                                                                              prog?: string | undefined;

                                                                                                                                                property usage

                                                                                                                                                usage?: string | undefined;

                                                                                                                                                  interface SubArgumentParserOptions

                                                                                                                                                  interface SubArgumentParserOptions extends ArgumentParserOptions {}

                                                                                                                                                    property aliases

                                                                                                                                                    aliases?: string[] | undefined;

                                                                                                                                                      property help

                                                                                                                                                      help?: string | undefined;

                                                                                                                                                        interface SubparserOptions

                                                                                                                                                        interface SubparserOptions {}

                                                                                                                                                          property action

                                                                                                                                                          action?: string | undefined;

                                                                                                                                                            property description

                                                                                                                                                            description?: string | undefined;

                                                                                                                                                              property dest

                                                                                                                                                              dest?: string | undefined;

                                                                                                                                                                property help

                                                                                                                                                                help?: string | undefined;

                                                                                                                                                                  property metavar

                                                                                                                                                                  metavar?: string | undefined;

                                                                                                                                                                    property parser_class

                                                                                                                                                                    parser_class?: { new (): any } | undefined;

                                                                                                                                                                      property prog

                                                                                                                                                                      prog?: string | undefined;

                                                                                                                                                                        property required

                                                                                                                                                                        required?: boolean | undefined;

                                                                                                                                                                          property title

                                                                                                                                                                          title?: string | undefined;

                                                                                                                                                                            Type Aliases

                                                                                                                                                                            type ActionConstructorOptions

                                                                                                                                                                            type ActionConstructorOptions = number & { _: 'ActionConstructorOptions' };

                                                                                                                                                                              Package Files (1)

                                                                                                                                                                              Dependencies (0)

                                                                                                                                                                              No dependencies.

                                                                                                                                                                              Dev Dependencies (0)

                                                                                                                                                                              No dev dependencies.

                                                                                                                                                                              Peer Dependencies (0)

                                                                                                                                                                              No peer dependencies.

                                                                                                                                                                              Badge

                                                                                                                                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/argparse.

                                                                                                                                                                              • Markdown
                                                                                                                                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/argparse)
                                                                                                                                                                              • HTML
                                                                                                                                                                                <a href="https://www.jsdocs.io/package/@types/argparse"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>