Handler response API for console messages.

export
interface

  IHandlerResponseConsoleApi

### Hierarchy

- IHandlerResponseConsoleApi

## Index

### Methods

- error
- errorHeader
- log
- prompt

## Methods

### error

- error(message: string | Buffer, ...values: any[]): string

- - Defined in @zowe/imperative/src/cmd/src/doc/response/api/handler/IHandlerResponseConsoleApi.ts:35

  Write a message to stderr (or buffers in silent/JSON mode). Automatically appends a newline to the message.

  memberof

    IHandlerResponseConsoleApi

  #### Parameters

  - ##### message: string | Buffer

    The message (or format string) to write to stderr

  - ##### Rest ...values: any[]

    The format string values for substitution/formatting.

  #### Returns string

  - The verbatim message written.

### errorHeader

- errorHeader(message: string, delimiter?: string): string

- - Defined in @zowe/imperative/src/cmd/src/doc/response/api/handler/IHandlerResponseConsoleApi.ts:44

  Writes an error header to stderr. The header is colorized (to red), appends a colon (e.g. "Syntax Error:"), and a new line. The intention of the error header is to begin an error block of text with a "tag" (the header).

  memberof

    IHandlerResponseConsoleApi

  #### Parameters

  - ##### message: string

    The message as the header.

  - ##### Optional delimiter: string

  #### Returns string

### log

- log(message: string | Buffer, ...values: any[]): string

- - Defined in @zowe/imperative/src/cmd/src/doc/response/api/handler/IHandlerResponseConsoleApi.ts:27

  Write a message to stdout (or buffers in silent/JSON mode). Automatically appends a newline to the message.

  memberof

    IHandlerResponseConsoleApi

  #### Parameters

  - ##### message: string | Buffer

    The message (or format string) to write to stdout.

  - ##### Rest ...values: any[]

    The format string values for substitution/formatting.

  #### Returns string

  - The verbatim message written.

### prompt

- prompt(questionText: string, opts?: IPromptOptions): Promise<string>

- - Defined in @zowe/imperative/src/cmd/src/doc/response/api/handler/IHandlerResponseConsoleApi.ts:52

  Handles prompting for CLI handlers

  memberof

    IHandlerResponseConsoleApi

  #### Parameters

  - ##### questionText: string

  - ##### Optional opts: IPromptOptions

  #### Returns Promise<string>

Generated using TypeDoc