Skip to content

ActionHandler

ActionHandler<Params> = [Params] extends [undefined] ? () => Promise<ActionResult> | ActionResult : (params) => Promise<ActionResult> | ActionResult

Defined in: packages/client/dist/lib/command-processor/action-runner.types.d.ts:49

Handler type for an action. Supports both sync and async handlers.

  • No params: returns ActionResult (or Promise<ActionResult>) directly
  • With params: receives typed params object, returns Promise<ActionResult>

Params