Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/onCommand"

Index

Enumerations

Classes

Type aliases

Functions

Type aliases

OnCommand

OnCommand: function

Handle the given command. Parameters will have been set on a fresh parameters instance before invocation

param

context from which GraphQL client can be obtained, messages can be sent etc.

returns

a Promise of a HandlerResult, containing a status code, or anything else representing success.

Type declaration

Functions

commandHandlerFrom

  • Create a HandleCommand instance with the appropriate metadata wrapping the given function

    Type parameters

    • P

    Parameters

    • h: OnCommand<P>
    • factory: Maker<P>
    • Default value name: string = h.name || `Command${generateHash(h.toString())}`
    • Default value description: string = name
    • Default value intent: string | string[] = []
    • Default value tags: string | string[] = []
    • Default value autoSubmit: boolean = false
    • Optional question: QuestionStyle

    Returns HandleCommand<P> & CommandHandlerMetadata

Generated using TypeDoc