Skip to content

Interface: OnQueryDecorator()<R, P, T> ​

Defined in: src/wirestate-lit/queries/on-query.ts:16

Describes type returned by onQuery.

Remarks ​

Supports both TC39 and legacy experimental decorators.

Type Parameters ​

Type ParameterDefault type
Runknown
Punknown
T extends QueryTypeQueryType

Call Signature ​

ts
OnQueryDecorator<This>(value: (this: This, payload: P) => MaybePromise<R>, context: ClassMethodDecoratorContext<This>): void;

Defined in: src/wirestate-lit/queries/on-query.ts:23

Describes type returned by onQuery.

Type Parameters ​

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

Parameters ​

ParameterType
value(this: This, payload: P) => MaybePromise<R>
contextClassMethodDecoratorContext<This>

Returns ​

void

Remarks ​

Supports both TC39 and legacy experimental decorators.

Call Signature ​

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

Defined in: src/wirestate-lit/queries/on-query.ts:28

Describes type returned by onQuery.

Parameters ​

ParameterType
targetobject
propertyKeystring | symbol
descriptorPropertyDescriptor

Returns ​

void

Remarks ​

Supports both TC39 and legacy experimental decorators.

Properties ​

type? ​

ts
readonly optional type?: T;

Defined in: src/wirestate-lit/queries/on-query.ts:21

Phantom brand carrying the query type T, never populated at runtime.