Event
interfaceAn event your mod publishes, declared at author time. This is the declaration, not an occurrence. Hold the value and pass it to `ctx.emit(declaration, payload)` to publish, or `ctx.on(declaration, listener)` to listen. Other mods and the host can subscribe by the same id.
Import
import { Event } from '@modular/sdk';Members7
- [runtimeContractCompilerValue]
GeneratedRuntimeContract- [runtimeContractType]
RuntimeContract<TPayload>- id
string & $brand<'EventDeclarationId'>Identifier, unique within the mod.
- kind
'event'- sensitivity
'workspace' | 'private' | 'public' | 'secret'How freely the host may share the payload, defaulting to `private`.
- stabilityoptional
'internal' | 'experimental' | 'stable'Compatibility promise you are making to subscribers.
- titleoptional
stringLabel shown where the host lists mod events.
Notes
- category
- State