Skip to main content Link Search Menu Expand Document (external link)

CliConfig.ts overview

Since v1.0.0


Exports Grouped by Category


constructors

defaultConfig

Signature

declare const defaultConfig: CliConfig

Source

Since v1.0.0

make

Signature

declare const make: (params: Partial<CliConfig>) => CliConfig

Source

Since v1.0.0

context

CliConfig

Signature

declare const CliConfig: Context.Tag<CliConfig, CliConfig>

Source

Since v1.0.0

defaultLayer

Signature

declare const defaultLayer: Layer.Layer<CliConfig>

Source

Since v1.0.0

layer

Signature

declare const layer: (config?: Partial<CliConfig>) => Layer.Layer<CliConfig>

Source

Since v1.0.0

models

CliConfig (interface)

Represents how arguments from the command-line are to be parsed.

Signature

export interface CliConfig {
  /**
   * Whether or not the argument parser should be case sensitive.
   *
   * Defaults to `false`.
   */
  readonly isCaseSensitive: boolean
  /**
   * Levenstein distance threshold for when to show auto correct suggestions.
   *
   * Defaults to `2`.
   */
  readonly autoCorrectLimit: number
  /**
   * Whether or not to perform a final check of the command-line arguments for
   * a built-in option, even if the provided command is not valid.
   *
   * Defaults to `false`.
   */
  readonly finalCheckBuiltIn: boolean
  /**
   * Whether or not to display all the names of an option in the usage of a
   * particular command.
   *
   * Defaults to `true`.
   */
  readonly showAllNames: boolean
  /**
   * Whether or not to display built-in options in the help documentation
   * generated for a `Command`.
   *
   * Defaults to `true`.
   */
  readonly showBuiltIns: boolean
  /**
   * Whether or not to display the type of an option in the usage of a
   * particular command.
   *
   * Defaults to `true`.
   */
  readonly showTypes: boolean
}

Source

Since v1.0.0

utilities

normalizeCase

Signature

declare const normalizeCase: { (text: string): (self: CliConfig) => string; (self: CliConfig, text: string): string }

Source

Since v1.0.0