Skip to main content

EventDeclaration

interface

An 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.

interface EventDeclaration<TPayload = unknown>

Import

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

Members6

__@runtimeContractInput@15821optional
TValue
id
EventDeclarationId

Identifier, unique within the mod.

kind
'event'
sensitivity
DataSensitivity

How freely the host may share the payload.

stability
DataStability

Compatibility promise you are making to subscribers.

titleoptional
string

Label shown where the host lists mod events.