Interface: ValueBindingDescriptor<T>
Defined in: src/wirestate-core/binding/binding.ts:75
Describes a token-bound value stored directly in the container.
Remarks
Use a value binding for constants, configuration, already-created objects, environment data, or external objects that Wirestate should resolve as-is. Value bindings are always singletons. They are cached as the provided value and are not wired into service lifecycle, provider lifecycle, or messaging.
The type field is optional for value bindings. Value-shaped descriptors do not support transient scope.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T | unknown | Value type resolved for the token. |
Properties
token
readonly token: ServiceToken<T>;Defined in: src/wirestate-core/binding/binding.ts:84
Token used to resolve the stored value.
type?
readonly optional type?: "Value";Defined in: src/wirestate-core/binding/binding.ts:79
Binding strategy. Optional for ordinary value descriptors.
value
readonly value: T;Defined in: src/wirestate-core/binding/binding.ts:89
Value returned when the token is resolved.