Domain event emitted when a book is deleted.
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
const event = new BookDeletedEvent({ title: "Deleted Book", userId: "user-123", caller: "deleteBook",});// event.eventType === "book.deleted"await eventHandler.handle(event); Copy
const event = new BookDeletedEvent({ title: "Deleted Book", userId: "user-123", caller: "deleteBook",});// event.eventType === "book.deleted"await eventHandler.handle(event);
Creates a new BookDeletedEvent.
Event data containing deletion details
The function/method that triggered the event
The title of the deleted book
The user who deleted the book
Readonly
The type of event (e.g., "article.created")
Contextual information about the event
Event-specific data
Domain event emitted when a book is deleted.
Remarks
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
Example
See