Interface: OnCommandDecorator()<R, P, T>
Defined in: src/wirestate-lit/commands/on-command.ts:16
Describes type returned by onCommand.
Remarks
Supports both TC39 and legacy experimental decorators.
Type Parameters
| Type Parameter | Default type |
|---|---|
R | unknown |
P | unknown |
T extends CommandType | CommandType |
Call Signature
ts
OnCommandDecorator<This>(value: (this: This, payload: P) => MaybePromise<R>, context: ClassMethodDecoratorContext<This>): void;Defined in: src/wirestate-lit/commands/on-command.ts:22
Describes type returned by onCommand.
Type Parameters
| Type Parameter |
|---|
This extends Interface<Omit<ReactiveElement, "renderRoot">> |
Parameters
| Parameter | Type |
|---|---|
value | (this: This, payload: P) => MaybePromise<R> |
context | ClassMethodDecoratorContext<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:27
Describes type returned by onCommand.
Parameters
| Parameter | Type |
|---|---|
target | object |
propertyKey | string | symbol |
descriptor | PropertyDescriptor |
Returns
void
Remarks
Supports both TC39 and legacy experimental decorators.
Properties
type?
ts
readonly optional type?: T;Defined in: src/wirestate-lit/commands/on-command.ts:20
Phantom field carrying the command type T.