Input object passed to the completion script loaded when specifying Completion.completionPath.

interface CompletionInput {
    argv: {
        $0: string;
        _: (string | number)[];
        [argName: string]: unknown;
    };
    cliUtils: CliUtils;
    current: string;
    defaultCompletions: string[];
    error: null | Error;
    iteratorHelper: __module;
    modulePath: null | string;
    yaml: __module;
}

Properties

argv: {
    $0: string;
    _: (string | number)[];
    [argName: string]: unknown;
}

All the arguments parsed by yargs

Type declaration

  • [argName: string]: unknown

    All remaining options

  • $0: string

    The script name or node command

  • _: (string | number)[]

    Non-option arguments

cliUtils: CliUtils

CLI utilities, useful to run commands.

current: string

The last inserted argument of nca command

defaultCompletions: string[]

Default yargs completions

error: null | Error

Completion errors

iteratorHelper: __module

Polyfill for iterator helper proposal. For more information refer to iterator-helper npm package.

modulePath: null | string

Module path

yaml: __module

Function for reading yaml files. For more information refer to js-yaml npm package.