@types/yargs-interactive
TypeScript icon, indicating that this package has built-in type declarations

2.1.6 • Public • Published

Installation

npm install --save @types/yargs-interactive

Summary

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

Details

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

index.d.ts

import { Argv } from "yargs";

declare function yargsInteractive(): yargsInteractive.Interactive;

declare namespace yargsInteractive {
    interface OptionData {
        type: "input" | "number" | "confirm" | "list" | "rawlist" | "expand" | "checkbox" | "password" | "editor";
        describe: string;
        default?: string | number | boolean | any[] | undefined;
        prompt?: "always" | "never" | "if-no-arg" | "if-empty" | undefined;
        choices?: string[] | undefined;
    }
    interface Option {
        [key: string]: OptionData | { default: boolean };
    }
    interface Interactive extends Argv {
        usage(usage: string): Interactive;
        interactive(options: Option): Interactive;
        then(callback: (result: any) => any): Interactive;
    }
}

export = yargsInteractive;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/yargs

Credits

These definitions were written by Nano Vazquez.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/yargs-interactive

Weekly Downloads

5,552

Version

2.1.6

License

MIT

Unpacked Size

4.32 kB

Total Files

5

Last publish

Collaborators

  • types