Interface: UseInjectionValue<T, F>
Defined in: src/wirestate-lit/consumption/use-injection.ts:59
Describes value returned by useInjection.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | - |
F | never |
Properties
token
ts
readonly token: ServiceToken<T>;Defined in: src/wirestate-lit/consumption/use-injection.ts:63
The token used for injection.
value
ts
readonly value: T | F;Defined in: src/wirestate-lit/consumption/use-injection.ts:76
The injected value.
Remarks
For a required lookup, reading this before the context resolves - i.e. the host is not nested under a container provider - throws a WirestateError, unless an initial value was supplied. Optional / fallback lookups hold undefined until resolution instead of throwing.
Throws
WirestateError When a required value is read before the container context resolves.