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.
Type Parameters
Section titled “Type Parameters”T = void
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”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.