Skip to content

EmitConfigSchema

const EmitConfigSchema: z.ZodType<{ event: string; payload?: Record<string, EmitPayloadItem>; }>

Defined in: packages/core/src/schemas/layer.schema.ts:228

The emit interaction: dispatch a named host event with a declarative payload projected from the clicked feature.

event is a required, plain string — the name resolved closed-world against the host’s handler map at attach time (an unregistered name is denied, never dispatched). payload is a record of named keys, each an EmitPayloadItemSchema projection. The format law: no field here may accept executable code, a DOM selector, or GLSL — emit names an event and projects feature properties declaratively.