Skip to main content

StateDeclarationInput

interface

Fields accepted by state. `sensitivity` defaults to `private`. `stability` stays absent unless you set it, and readers resolve the effective value through stateStability.

interface StateDeclarationInput<TValue>

Import

import { StateDeclarationInput } from '@modular/sdk';

Members8

[runtimeContractCompilerValue]optional
GeneratedRuntimeContract
[runtimeContractInput]optional
TValue
id
string

Identifier, unique within the mod.

initial
TValue

Value used the first time this state is registered.

scope
'profile' | 'workspace'

Whether the value persists per workspace or per profile.

sensitivityoptional
'workspace' | 'private' | 'public' | 'secret'

How freely the host may share the value. Defaults to `private`.

stabilityoptional
'internal' | 'experimental' | 'stable'

Compatibility promise you are making to readers of this state.

titleoptional
string

Human-readable label shown where the host lists mod state.

Notes

category
State