fynjs API
    Preparing search index...

    Type Alias CommandSpec

    CommandSpec: BaseSpec & {
        allowUnknownOption?: boolean;
        exec?: CommandExecFunc | CommandExecAsyncFunc;
        options?: GroupOptionSpec;
        subCommands?: Record<string, CommandSpec>;
        usage?: string | (() => string);
    }

    Represents the specification for a command.

    Type Declaration

    • OptionalallowUnknownOption?: boolean

      Allow unknown options

    • Optionalexec?: CommandExecFunc | CommandExecAsyncFunc

      Execute funtion to invoke for the command

    • Optionaloptions?: GroupOptionSpec

      Options for this command only

    • OptionalsubCommands?: Record<string, CommandSpec>

      Sub commands under this command

    • Optionalusage?: string | (() => string)

      Command usage help text