Skip to content

Interface: InjectionDecorator()<T>

Defined in: src/wirestate-lit/consumption/injection.ts:26

Describes type returned by injection.

Remarks

Supports both TC39 and legacy experimental decorators. The type parameter is the resolved value type - T for a required injection, T | undefined for an optional one, or T | F when a fallback is given.

Type Parameters

Type Parameter
T

Call Signature

ts
InjectionDecorator<C, V>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V> & ProvidedTypeMustMatch<T, V>): void;

Defined in: src/wirestate-lit/consumption/injection.ts:29

Describes type returned by injection.

Type Parameters

Type Parameter
C extends Interface<Omit<ReactiveElement, "renderRoot">>
V

Parameters

ParameterType
valueClassAccessorDecoratorTarget<C, V>
contextClassAccessorDecoratorContext<C, V> & ProvidedTypeMustMatch<T, V>

Returns

void

Remarks

Supports both TC39 and legacy experimental decorators. The type parameter is the resolved value type - T for a required injection, T | undefined for an optional one, or T | F when a fallback is given.

Call Signature

ts
InjectionDecorator<C, V>(value: undefined, context: ClassFieldDecoratorContext<C, V> & ProvidedTypeMustMatch<T, V>): void;

Defined in: src/wirestate-lit/consumption/injection.ts:35

Describes type returned by injection.

Type Parameters

Type Parameter
C extends Interface<Omit<ReactiveElement, "renderRoot">>
V

Parameters

ParameterType
valueundefined
contextClassFieldDecoratorContext<C, V> & ProvidedTypeMustMatch<T, V>

Returns

void

Remarks

Supports both TC39 and legacy experimental decorators. The type parameter is the resolved value type - T for a required injection, T | undefined for an optional one, or T | F when a fallback is given.

Call Signature

ts
InjectionDecorator<K, Proto>(protoOrDescriptor: Proto, name?: K): FieldMustMatchProvidedType<Proto, K, T>;

Defined in: src/wirestate-lit/consumption/injection.ts:40

Describes type returned by injection.

Type Parameters

Type Parameter
K extends PropertyKey
Proto extends Interface<Omit<ReactiveElement, "renderRoot">>

Parameters

ParameterType
protoOrDescriptorProto
name?K

Returns

FieldMustMatchProvidedType<Proto, K, T>

Remarks

Supports both TC39 and legacy experimental decorators. The type parameter is the resolved value type - T for a required injection, T | undefined for an optional one, or T | F when a fallback is given.