@modular/sdk/state
12 exports in 3 groups.
Interfaces9
- OwnedStateinterfaceA writable handle to state your own mod declared. Returned by `ctx.state(declaration)` when you pass the value you built with state.
- StateinterfaceA read-only handle to one state value. Returned by `ctx.state('editor.selection')` and the other built-in state names.
- StateDeclarationinterfaceOne piece of state your mod owns, declared at author time. This is the declaration, not the data.
- StateDeclarationInputinterfaceFields accepted by state. `sensitivity` defaults to `private`.
- StateFactoryinterfaceCall signature of state.
- StateSetOptionsinterfaceOptions for OwnedState.set.
- StateDescriptorinterfaceid, owner, schema, scope, sensitivity, stability, title
- StateSnapshotinterfaceaccessScope, capturedAt, descriptor, id, kind, previous, revision, value
- StateVersioninterfacecapturedAt, revision, value
Functions2
- stateSchemaNamefunctionName of the generated type contract behind a declaration. The host reads this when folding a mod's state into its manifest.
- stateStabilityfunctionEffective stability of a declaration, falling back to `experimental` when the author left it unset. Registration machinery uses this, not mod code.