- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
DomainEvent
An event passed from an EventHandler to a Subscriber.
Usually this will not be created manually but automatically
while dispatching events at the EventHandler
| Name | 
|---|
| Payload | 
- 
↳ DomainEvent
• new DomainEvent<Payload>(name, payload)
| Name | 
|---|
| Payload | 
| Name | Type | 
|---|---|
| name | string | 
| payload | Payload | 
• Private _id: string
• Private _name: string
• Private _payload: Payload
• Private _timestamp: Date
• get id(): string
string
• get name(): string
The name of the EventHandler which dispatched this event
string
• get payload(): Payload
the payload which was given while dispatching the event
Payload
• get timestamp(): Date
the Date this event was dispatched at the EventHandler
Date
▸ toJSON(): Record<any, any>
reduces the Serializable to its private ("underscored") attributes. All non-underscored attributes and methods will be omitted.
This method overrides the built-in toJSON() which is primarily used in JSON.stringify()
Record<any, any>
an object containing all private attributes