Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api-helper/command/createCommand"

Index

Functions

Functions

createCommand

  • Wrap a function in a command handler, allowing use of custom parameters. Targeting (targets property) is handled automatically if the parameters do not implement TargetsParams

    Type parameters

    • PARAMS = NoParameters

    Parameters

    • sdm: MachineOrMachineOptions

      machine or options

    • commandMaker: (sdm: MachineOrMachineOptions) => OnCommand<PARAMS>

      function to create command function

    • name: string

      command name

    • Default value paramsMaker: Maker<PARAMS> = NoParameters as Maker<PARAMS>

      parameters factory, typically the name of a class with a no arg constructor

    • Default value details: Partial<CommandDetails> = {}

      optional details to customize behavior Add intent "edit "

    Returns HandleCommand<PARAMS>

Generated using TypeDoc