Skip to content

defineEvent

defineEvent<T>(name): EventToken<T>

Defined in: EventToken.ts:26

Create a typed event token. Entity and scene events dispatch by the name string, so two tokens with one name are one channel whose payload types are not checked against each other; in dev builds a second definition of a name warns.

T = void

string

EventToken<T>

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.