Skip to main content

@kosko/template

Template utilities.

Index

Type Aliases

publicOptionKeyRefs

OptionKeyRefs<T>: T | readonly T[] | Record<string, T | readonly T[]>

Type parameters

  • T

publicOptions

Options<T, O>: yargs.Options & { choices?: readonly T[]; coerce?: (arg: any) => T; conflicts?: OptionKeyRefs<keyof O>; default?: T | () => T | undefined; implies?: OptionKeyRefs<keyof O> } & (T extends string ? { type: string } | { string: true } : T extends number ? { type: number | count } | { number: true } | { count: true } : T extends boolean ? { type: boolean } | { boolean: true } : T extends any[] ? { type: array } | { array: true } : unknown)

Type parameters

  • T
  • O