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

    Variable runConst

    run: <const E extends object, const S extends object, const SS extends object>(
        data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & InferSubSubCommandOptionsArguments<
            SS,
        > & NoInfer<
            (
                ParseData & (E & Simplify<{ [K in keyof S]: K extends keyof SS ? Simplify<{ [K in keyof S[K]]: K extends keyof SS[K] ? Simplify<{ [K in keyof S[K][K]]: K extends keyof SS[K][K] ? Simplify<...> : S[K][K][K]; } & { [K in keyof SS[K][K] as K extends keyof S[K][K] ? never : K]: SS[K][K][K]; }> : S[K][K]; } & { [K in key...
            ) & (
                (
                    E & Simplify<
                        {
                            [K in string
                            | number
                            | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                        } & {
                            [K in string
                            | number
                            | symbol as K extends keyof (...) ? never : K]: SS[K]
                        },
                    >
                ) extends { subCommands: {} }
                    ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                    : {}
            ) & MainDeclarations<
                E & Simplify<
                    {
                        [K in string
                        | number
                        | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                    } & {
                        [K in string
                        | number
                        | symbol as K extends keyof (...) ? never : K]: SS[K]
                    },
                >,
                null,
                [
                    E & Simplify<
                        {
                            [K in (...)
                            | (...)
                            | (...)]: (...) extends (...) ? (...) : (...)
                        } & {
                            [K in (...)
                            | (...)
                            | (...) as (...) extends (...) ? (...) : (...)]: (...)[(...)]
                        },
                    >,
                ],
            >,
        >,
        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, const SS extends object>(
            data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & InferSubSubCommandOptionsArguments<
                SS,
            > & NoInfer<
                (
                    ParseData & (E & Simplify<{ [K in keyof S]: K extends keyof SS ? Simplify<{ [K in keyof S[K]]: K extends keyof SS[K] ? Simplify<{ [K in keyof S[K][K]]: K extends keyof SS[K][K] ? Simplify<...> : S[K][K][K]; } & { [K in keyof SS[K][K] as K extends keyof S[K][K] ? never : K]: SS[K][K][K]; }> : S[K][K]; } & { [K in key...
                ) & (
                    (
                        E & Simplify<
                            {
                                [K in string
                                | number
                                | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                            } & {
                                [K in string
                                | number
                                | symbol as K extends keyof (...) ? never : K]: SS[K]
                            },
                        >
                    ) extends { subCommands: {} }
                        ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                        : {}
                ) & MainDeclarations<
                    E & Simplify<
                        {
                            [K in string
                            | number
                            | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                        } & {
                            [K in string
                            | number
                            | symbol as K extends keyof (...) ? never : K]: SS[K]
                        },
                    >,
                    null,
                    [
                        E & Simplify<
                            {
                                [K in (...)
                                | (...)
                                | (...)]: (...) extends (...) ? (...) : (...)
                            } & {
                                [K in (...)
                                | (...)
                                | (...) as (...) extends (...) ? (...) : (...)]: (...)[(...)]
                            },
                        >,
                    ],
                >,
            >,
            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
        • const SS extends object

        Parameters

        • data: InferRootOptionsArguments<E> & InferSubCommandOptionsArguments<S> & InferSubSubCommandOptionsArguments<
              SS,
          > & NoInfer<
              (
                  ParseData & (E & Simplify<{ [K in keyof S]: K extends keyof SS ? Simplify<{ [K in keyof S[K]]: K extends keyof SS[K] ? Simplify<{ [K in keyof S[K][K]]: K extends keyof SS[K][K] ? Simplify<...> : S[K][K][K]; } & { [K in keyof SS[K][K] as K extends keyof S[K][K] ? never : K]: SS[K][K][K]; }> : S[K][K]; } & { [K in key...
              ) & (
                  (
                      E & Simplify<
                          {
                              [K in string
                              | number
                              | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                          } & {
                              [K in string
                              | number
                              | symbol as K extends keyof (...) ? never : K]: SS[K]
                          },
                      >
                  ) extends { subCommands: {} }
                      ? { subCommands: SanitizeSubCommandOptArgs<O["subCommands"]> }
                      : {}
              ) & MainDeclarations<
                  E & Simplify<
                      {
                          [K in string
                          | number
                          | symbol]: K extends keyof (...) ? Simplify<(...)> : (...)[(...)]
                      } & {
                          [K in string
                          | number
                          | symbol as K extends keyof (...) ? never : K]: SS[K]
                      },
                  >,
                  null,
                  [
                      E & Simplify<
                          { [K in (...)
                          | (...)
                          | (...)]: (...) extends (...) ? (...) : (...) } & {
                              [K in (...) | (...) | (...) as (...) extends (...) ? (...) : (...)]: (
                                  ...
                              )[(...)]
                          },
                      >,
                  ],
              >,
          >

          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