Skip to content

Interface: OptionalInjectionDecorator()<T, F>

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

Represents type returned by optionalInjection.

Remarks

Supports both TC39 and legacy experimental decorators.

Type Parameters

Type ParameterDefault type
T-
Fnull

Call Signature

ts
OptionalInjectionDecorator<C, V>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): void;

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

Represents type returned by optionalInjection.

Type Parameters

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

Parameters

ParameterType
valueClassAccessorDecoratorTarget<C, V>
contextClassAccessorDecoratorContext<C, V>

Returns

void

Remarks

Supports both TC39 and legacy experimental decorators.

Call Signature

ts
OptionalInjectionDecorator<K, Proto>(protoOrDescriptor: Proto, name?: K): FieldMustMatchProvidedType<Proto, K, T | F>;

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

Represents type returned by optionalInjection.

Type Parameters

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

Parameters

ParameterType
protoOrDescriptorProto
name?K

Returns

FieldMustMatchProvidedType<Proto, K, T | F>

Remarks

Supports both TC39 and legacy experimental decorators.