Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @kcinternal/runners

Index

Type aliases

Action<O>: (option: O, context: Context) => string[] | Promise<string[]>

Type parameters

  • O

Type declaration

    • (option: O, context: Context): string[] | Promise<string[]>
    • Parameters

      Returns string[] | Promise<string[]>

DefaultArgument: { --?: string[]; _: string[] }

Type declaration

  • Optional --?: string[]

    If opts['--'] is true, populated with everything after the --

  • _: string[]

    Contains all the arguments that didn't have an option associated with them

Execution<T, O>: (context: Context, data: ExecutionData<O>) => T

Type parameters

Type declaration

ExecutionData<O>: { commands: string[]; option?: O }

Type parameters

  • O

Type declaration

  • commands: string[]
  • Optional option?: O
HistoryData<I, O>: { input: I | undefined; output: O | undefined }

Type parameters

  • I

  • O

Type declaration

  • input: I | undefined
  • output: O | undefined
Nullable<T>: Optional<T>

Type parameters

  • T

OptionData: { args: string[]; debug: boolean; dryrun: boolean; extraArgs: string[]; help: boolean; raw: string[] }

Type declaration

  • args: string[]

    all argument left after parsing option

  • debug: boolean
  • dryrun: boolean
  • extraArgs: string[]

    all argument after -- option

  • help: boolean
  • raw: string[]

    raw input argument

OptionMapper<O>: { [ key in keyof O]: OptionTransformer<O[key]> }

Type parameters

  • O

OptionTransformer<T>: { alias?: string[]; defaultValue: T; fn: any }

Type parameters

  • T

Type declaration

Transformer<I, O, P>: { name: string; previous?: Transformer<P, I>; transform: any }

Type parameters

  • I

  • O

  • P = unknown

Type declaration

Properties

_version: string = "0.2.2"

Generated using TypeDoc