Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IHandlerResponseDataApi

APIs for the command handlers to construct the JSON response object for the command. The JSON response object is built/written when the "response format JSON" flag is set. The intention is to allow for structured information/data to be provided to the caller (who is requesting the JSON format of the command output) for programmatic usage of Imperative commands.

export
interface

IHandlerResponseDataApi

Hierarchy

  • IHandlerResponseDataApi

Index

Methods

setExitCode

  • setExitCode(code: number): number

setMessage

  • setMessage(message: string, ...values: any[]): string

setObj

  • setObj(data: any, merge?: boolean): any
  • The JSON response object for a command contains a property that is intended to contain any custom object(s)/data that the command wants to return to the caller.

    memberof

    IHandlerResponseDataApi

    Parameters

    • data: any

      The object to set in the JSON response.

    • Optional merge: boolean

      If true, will merge the object with the existing data already set.

    Returns any

    • The object.

Generated using TypeDoc