mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
24 lines
547 B
JavaScript
24 lines
547 B
JavaScript
/**
|
|
* @typedef {object} MentionCreatedEventData
|
|
* @property {import('./Mention')} mention
|
|
*/
|
|
|
|
module.exports = class MentionCreatedEvent {
|
|
/**
|
|
* @param {MentionCreatedEventData} data
|
|
* @param {Date} timestamp
|
|
*/
|
|
constructor(data, timestamp) {
|
|
this.data = data;
|
|
this.timestamp = timestamp;
|
|
}
|
|
|
|
/**
|
|
* @param {MentionCreatedEventData} data
|
|
* @param {Date} [timestamp]
|
|
*/
|
|
static create(data, timestamp) {
|
|
return new MentionCreatedEvent(data, timestamp ?? new Date);
|
|
}
|
|
};
|