Domain event emitted when a note is created.
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
const event = new NoteCreatedEvent({ title: "Meeting Notes", markdown: "# Meeting Notes\n\n- Item 1", userId: "user-123", caller: "addNote",});// event.eventType === "note.created"await eventHandler.handle(event); Copy
const event = new NoteCreatedEvent({ title: "Meeting Notes", markdown: "# Meeting Notes\n\n- Item 1", userId: "user-123", caller: "addNote",});// event.eventType === "note.created"await eventHandler.handle(event);
Creates a new NoteCreatedEvent.
Event data containing note details and metadata
The function/method that triggered the event
The markdown content
The note title
The user who created the note
Readonly
The type of event (e.g., "article.created")
Contextual information about the event
Event-specific data
Domain event emitted when a note is created.
Remarks
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
Example
See