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

    Type Alias Config<P, Value>Experimental

    Param type for prompt method config, optionally restricted by prompt slug.

    Slug

    type Config<
        P extends Slug = Slug,
        Value extends
            SelectValue = P extends "bool"
            ? boolean
            : P extends "input" ? string : P extends "select" ? SelectValue : never,
    > = {
        message: string;
        default?: Value;
        msgArgs?: Partial<MessageMaker.MsgArgs & { timestamp: boolean }>;
        styleClrs?: Partial<node.NodeConsole.Args["styleClrs"]>;
        theme?: RecursivePartial<DefaultTheme>;
        timeout?: number;
    }

    Type Parameters

    Index

    Properties

    message: string

    Prompt message before input.

    default?: Value

    Default value, if any.

    msgArgs?: Partial<MessageMaker.MsgArgs & { timestamp: boolean }>

    Optional configuration for output messages while prompting.

    styleClrs?: Partial<node.NodeConsole.Args["styleClrs"]>

    Colours used to style output.

    theme?: RecursivePartial<DefaultTheme>
    timeout?: number