run | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Variable runConst

    run: <const E extends object, const S extends object>(
        data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & NoInfer<
            (
                ParseData & (E & S extends { options: {}; } ? { options: SanitizeOptions<({ options: {}; } & E & S)["options"]>; } : {})
            ) & (
                (E & S) extends { subCommands: {} }
                    ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                    : {}
            ) & MainDeclarations<E & S, null, null>,
        >,
        options?: { argv?: string[] },
    ) => {
        globalOpts: NarrowTruthy<
            Simplify<
                Simplify<
                    {
                        -readonly [Key in string as OptionValueAlwaysPresent<
                            ((...) & (...))[Key],
                        > extends true
                            ? GetOptionListStoreName<Key>
                            : never]-?: GetParsedType<
                            ((...)[(...)] & {})[Key],
                            string,
                            IsMultiple<((...) & (...))[Key]>,
                        >
                    } & {
                        -readonly [Key in string as OptionValueAlwaysPresent<
                            ((...) & (...))[Key],
                        > extends true
                            ? never
                            : GetOptionListStoreName<Key>]?: GetParsedType<
                            ((...) & (...))[Key],
                            string,
                            IsMultiple<(...)[(...)]>,
                        >
                    } & {
                        -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                    } & object,
                >,
            >,
        >;
        onDone?: () => void;
        specifiedGlobalOpts: (
            keyof Simplify<
                Simplify<
                    {
                        -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                            ? GetOptionListStoreName<Key>
                            : never]-?: GetParsedType<
                            ((...) & (...))[Key],
                            string,
                            IsMultiple<(...)[(...)]>,
                        >
                    } & {
                        -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                            ? never
                            : GetOptionListStoreName<Key>]?: GetParsedType<
                            (...)[(...)],
                            string,
                            IsMultiple<(...)>,
                        >
                    } & {
                        -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                    } & object,
                >,
            >
        )[];
    } = runCli

    Type Declaration

      • <const E extends object, const S extends object>(
            data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & NoInfer<
                (
                    ParseData & (E & S extends { options: {}; } ? { options: SanitizeOptions<({ options: {}; } & E & S)["options"]>; } : {})
                ) & (
                    (E & S) extends { subCommands: {} }
                        ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                        : {}
                ) & MainDeclarations<E & S, null, null>,
            >,
            options?: { argv?: string[] },
        ): {
            globalOpts: NarrowTruthy<
                Simplify<
                    Simplify<
                        {
                            -readonly [Key in string as OptionValueAlwaysPresent<
                                ((...) & (...))[Key],
                            > extends true
                                ? GetOptionListStoreName<Key>
                                : never]-?: GetParsedType<
                                ((...)[(...)] & {})[Key],
                                string,
                                IsMultiple<((...) & (...))[Key]>,
                            >
                        } & {
                            -readonly [Key in string as OptionValueAlwaysPresent<
                                ((...) & (...))[Key],
                            > extends true
                                ? never
                                : GetOptionListStoreName<Key>]?: GetParsedType<
                                ((...) & (...))[Key],
                                string,
                                IsMultiple<(...)[(...)]>,
                            >
                        } & {
                            -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                        } & object,
                    >,
                >,
            >;
            onDone?: () => void;
            specifiedGlobalOpts: (
                keyof Simplify<
                    Simplify<
                        {
                            -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                                ? GetOptionListStoreName<Key>
                                : never]-?: GetParsedType<
                                ((...) & (...))[Key],
                                string,
                                IsMultiple<(...)[(...)]>,
                            >
                        } & {
                            -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                                ? never
                                : GetOptionListStoreName<Key>]?: GetParsedType<
                                (...)[(...)],
                                string,
                                IsMultiple<(...)>,
                            >
                        } & {
                            -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                        } & object,
                    >,
                >
            )[];
        }
      • Run a command line application

        Type Parameters

        • const E extends object
        • const S extends object

        Parameters

        • data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & NoInfer<
              (
                  ParseData & (E & S extends { options: {}; } ? { options: SanitizeOptions<({ options: {}; } & E & S)["options"]>; } : {})
              ) & (
                  (E & S) extends { subCommands: {} }
                      ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                      : {}
              ) & MainDeclarations<E & S, null, null>,
          >

          Command configuration

        • options: { argv?: string[] } = {}

          Options for the run

          • argv: Override arguments. (defaults to process.argv.slice(2))

        Returns {
            globalOpts: NarrowTruthy<
                Simplify<
                    Simplify<
                        {
                            -readonly [Key in string as OptionValueAlwaysPresent<
                                ((...) & (...))[Key],
                            > extends true
                                ? GetOptionListStoreName<Key>
                                : never]-?: GetParsedType<
                                ((...)[(...)] & {})[Key],
                                string,
                                IsMultiple<((...) & (...))[Key]>,
                            >
                        } & {
                            -readonly [Key in string as OptionValueAlwaysPresent<
                                ((...) & (...))[Key],
                            > extends true
                                ? never
                                : GetOptionListStoreName<Key>]?: GetParsedType<
                                ((...) & (...))[Key],
                                string,
                                IsMultiple<(...)[(...)]>,
                            >
                        } & {
                            -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                        } & object,
                    >,
                >,
            >;
            onDone?: () => void;
            specifiedGlobalOpts: (
                keyof Simplify<
                    Simplify<
                        {
                            -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                                ? GetOptionListStoreName<Key>
                                : never]-?: GetParsedType<
                                ((...) & (...))[Key],
                                string,
                                IsMultiple<(...)[(...)]>,
                            >
                        } & {
                            -readonly [Key in string as OptionValueAlwaysPresent<(...)[(...)]> extends true
                                ? never
                                : GetOptionListStoreName<Key>]?: GetParsedType<
                                (...)[(...)],
                                string,
                                IsMultiple<(...)>,
                            >
                        } & {
                            -readonly [Key in string as GetOptionListStoreName<Key>]: boolean
                        } & object,
                    >,
                >
            )[];
        }

    • use runCli instead, run is too generic a name. Deprecated in WH 6.0, backported to WH 5.9.5