Before invoking commands, this class configures some settings and callbacks in Yargs, including what happens on syntax failures.

### Hierarchy

- YargsConfigurer

## Index

### Constructors

- constructor

### Properties

- commandLine
- commandRespParms
- envVariablePrefix
- experimentalCommandDescription
- helpGeneratorFactory
- promptPhrase
- rootCommand
- rootCommandName
- yargs

### Methods

- buildFailedCommandDefinition
- buildFailureMessage
- configure
- getClosestCommand
- getResponseFormat

### Object literals

- yargsConfiguration

## Constructors

### constructor

- new YargsConfigurer(rootCommand: ICommandDefinition, yargs: any, commandRespParms: ICommandResponseParms, helpGeneratorFactory: IHelpGeneratorFactory, experimentalCommandDescription: string, rootCommandName: string, commandLine: string, envVariablePrefix: string, promptPhrase: string): YargsConfigurer

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:30

  #### Parameters

  - ##### rootCommand: ICommandDefinition

  - ##### yargs: any

  - ##### commandRespParms: ICommandResponseParms

  - ##### helpGeneratorFactory: IHelpGeneratorFactory

  - ##### experimentalCommandDescription: string

  - ##### rootCommandName: string

  - ##### commandLine: string

  - ##### envVariablePrefix: string

  - ##### promptPhrase: string

  #### Returns YargsConfigurer

## Properties

### Private commandLine

commandLine: string

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:37

### Private commandRespParms

commandRespParms: ICommandResponseParms

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:33

### Private envVariablePrefix

envVariablePrefix: string

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:38

### Private experimentalCommandDescription

experimentalCommandDescription: string

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:35

### Private helpGeneratorFactory

helpGeneratorFactory: IHelpGeneratorFactory

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:34

### Private promptPhrase

promptPhrase: string

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:39

### Private rootCommand

rootCommand: ICommandDefinition

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:31

### Private rootCommandName

rootCommandName: string

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:36

### Private yargs

yargs: any

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:32

## Methods

### Private buildFailedCommandDefinition

- buildFailedCommandDefinition(): ICommandDefinition

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:282

  Define failed command with the current command line arguments.

  #### Returns ICommandDefinition

  Failed command definition object

### Private buildFailureMessage

- buildFailureMessage(closestCommand?: string): string

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:228

  Builds the failure message that is passed to the failedCommand handler

  #### Parameters

  - ##### Optional closestCommand: string

  #### Returns string

  - Returns the failure message

### configure

- configure(): void

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:48

  #### Returns void

### Private getClosestCommand

- getClosestCommand(attemptedCommand: string): any

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:308

  #### Parameters

  - ##### attemptedCommand: string

  #### Returns any

### Private getResponseFormat

- getResponseFormat(argv: Arguments): COMMAND_RESPONSE_FORMAT

- - Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:325

  Get the command response format based on whether `--rfj` is set.

  #### Parameters

  - ##### argv: Arguments

    Yargs arguments object

  #### Returns COMMAND_RESPONSE_FORMAT

## Object literals

### Static Readonly yargsConfiguration

yargsConfiguration: object

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:43

### parse-numbers

parse-numbers: false = false

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:44

### parse-positional-numbers

parse-positional-numbers: false = false

- Defined in @zowe/imperative/src/cmd/src/yargs/YargsConfigurer.ts:45

Generated using TypeDoc