Back to Homebridge

Type Alias MatterCommandHandler<TArgs>

docs/types/MatterCommandHandler.html

2.0.2826 B
Original Source
  • MatterCommandHandler

Type Alias MatterCommandHandler<TArgs>

MatterCommandHandler: (
args: TArgs,
context?: MatterHandlerContext,
) => Promise<void> | void

Matter command handler function type

Handlers can be synchronous or asynchronous (returning a Promise). The args parameter contains the command arguments passed by Matter.js (optional). The context parameter provides information about which part triggered the handler (for composed devices).

Type Parameters

  • TArgs = unknown

Type Declaration

    • (args: TArgs, context?: MatterHandlerContext): Promise<void> | void

Parameters

- args: [TArgs](#targs)
- `Optional`context: MatterHandlerContext

Returns Promise<void> | void

Settings

Member Visibility

  • Inherited

ThemeOSLightDark