The output format object is returned from a successful command handler to dictate how the output for the command should be formatted. This is an optional feature for Imperative and handlers are not required to return this object (they can format their own output).

These properties represent the defaults for the handler. If the command definition includes the output format options, the options take precedence over the default values (see ICommandDefinition for details).

export
interface

  ICommandOutput

### Hierarchy

- ICommandOutputFormat

## Index

### Properties

- fields
- format
- header
- output

## Properties

### Optional fields

fields: string[]

- Defined in @zowe/imperative/src/cmd/src/doc/response/response/ICommandOutputFormat.ts:68

If the response is an object (or an array of objects) these are the top level properties to keep. For example, if an array of homogeneous objects are returned in the output, the fields that are NOT specified in this array are removed/deleted from each object.

memberof

  ICommandOutput

### format

format: OUTPUT_FORMAT

- Defined in @zowe/imperative/src/cmd/src/doc/response/response/ICommandOutputFormat.ts:60

The output format type (see the type for details). In most cases, any data type returned (on the output property) can be formatted according to the type specified here.

memberof

  ICommandOutput

### Optional header

header: boolean

- Defined in @zowe/imperative/src/cmd/src/doc/response/response/ICommandOutputFormat.ts:74

If response format table is specified, print the table headings

memberof

  ICommandOutput

### output

output: any

- Defined in @zowe/imperative/src/cmd/src/doc/response/response/ICommandOutputFormat.ts:53

The output data to format. Common output data includes arrays of strings/objects, JSON objects, strings.

memberof

  ICommandOutputFormat

Generated using TypeDoc