Utility TypeScript @ 2.0.0-beta
    Preparing search index...

    Type Alias ArgsExperimental

    Optional configuration for NodeConsole_Prompt.

    type Args = {
        throwError: "always" | "never" | "auto";
        timeout: number;
    }
    Index

    Properties

    Properties

    throwError: "always" | "never" | "auto"

    Whether to throw an error on timeout.

    Options:

    • always: Always throws an error on prompt timeout.
    • never: Never throws an error on prompt timeout (returns undefined).
    • auto: Only throws an error on timeout if there is no default or if required is true.
    'auto'
    
    timeout: number

    Maximum time to wait before a prompt times out, in milliseconds.

    If falsy, the prompt never times out (use this cautiously -- it's probably always better to just use a very long timeout).

    300000