Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "onCommand"

Index

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>

      handle function

    • factory: Maker<P>

      construction function

    • Default value name: string = h.name || `Command${generateHash(h.toString())}`

      can be omitted if the function isn't exported

    • Default value description: string = name
    • Default value intent: string | string[] = []
    • Default value tags: string | string[] = []

    Returns HandleCommand<P> & CommandHandlerMetadata

Generated using TypeDoc