Skip to content

Interface: OnCommandDecorator()<D, R>

Defined in: src/wirestate-lit/commands/on-command.ts:16

Represents type returned by onCommand.

Remarks

Supports both TC39 and legacy experimental decorators.

Type Parameters

Type ParameterDefault type
Dunknown
Runknown

Call Signature

ts
OnCommandDecorator<This>(value: (this: This, data: D) => MaybePromise<R>, context: ClassMethodDecoratorContext<This>): void;

Defined in: src/wirestate-lit/commands/on-command.ts:18

Represents type returned by onCommand.

Type Parameters

Type Parameter
This extends Interface<Omit<ReactiveElement, "renderRoot">>

Parameters

ParameterType
value(this: This, data: D) => MaybePromise<R>
contextClassMethodDecoratorContext<This>

Returns

void

Remarks

Supports both TC39 and legacy experimental decorators.

Call Signature

ts
OnCommandDecorator(
   target: object, 
   propertyKey: string | symbol, 
   descriptor: PropertyDescriptor): void;

Defined in: src/wirestate-lit/commands/on-command.ts:23

Represents type returned by onCommand.

Parameters

ParameterType
targetobject
propertyKeystring | symbol
descriptorPropertyDescriptor

Returns

void

Remarks

Supports both TC39 and legacy experimental decorators.