You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
452 B
20 lines
452 B
import {Model} from '../Model'
|
|
import {BaseEvent} from '../../../support/bus'
|
|
import {Awaitable} from '../../../util'
|
|
|
|
/**
|
|
* Base class for events that concern an instance of a model.
|
|
* @fixme support serialization
|
|
*/
|
|
export abstract class ModelEvent<T extends Model<T>> extends BaseEvent {
|
|
constructor(
|
|
public readonly instance: T,
|
|
) {
|
|
super()
|
|
}
|
|
|
|
shouldBroadcast(): Awaitable<boolean> {
|
|
return false
|
|
}
|
|
}
|