stateBridge<
State>(key):StateBridge<State>
Defined in: packages/wire/src/state-bridge.ts:59
Create the StateBridge for one package, keyed by the string in its
Symbol.for key.
A package owns exactly one bridge. Its key is part of no wire format: it identifies the attached state within a realm, and nothing persists it.
Type Parameters
Section titled “Type Parameters”State
Parameters
Section titled “Parameters”string
A knotkit/<module>/<name>@<version> key. The version suffix
allows a later release to move its state shape without reading state attached
by an older copy loaded beside it.
Returns
Section titled “Returns”StateBridge<State>
Throws
Section titled “Throws”With INVALID_ARGUMENT when key does not
match that shape.