Create a new domain event definition.
This is a domain-focused alias around defineEvent(...) for applications that separate domain events from integration events.
defineEvent(...)
const UserRegistered = defineDomainEvent( "user.registered", z.object({ userId: z.string(), email: z.string().email(), }));type UserRegistered = typeof UserRegistered; Copy
const UserRegistered = defineDomainEvent( "user.registered", z.object({ userId: z.string(), email: z.string().email(), }));type UserRegistered = typeof UserRegistered;
Create a new domain event definition.
This is a domain-focused alias around
defineEvent(...)for applications that separate domain events from integration events.