Model event payloads by event name.
Section: API and Domain Modeling Recipes
Typed event map
typescript
typescript
type Events = {
"user.created": { id: string };
"user.deleted": { id: string };
};Explanation
A typed event map pairs well with `keyof` and indexed access helpers.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing API and Domain Modeling Recipes