Add basic concepts for event bus, and implement in request and model
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
11
src/event/Event.ts
Normal file
11
src/event/Event.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import {Dispatchable} from './types'
|
||||
import {JSONState} from '../util'
|
||||
|
||||
/**
|
||||
* Abstract class representing an event that may be fired.
|
||||
*/
|
||||
export abstract class Event implements Dispatchable {
|
||||
abstract dehydrate(): Promise<JSONState>
|
||||
|
||||
abstract rehydrate(state: JSONState): void | Promise<void>
|
||||
}
|
||||
Reference in New Issue
Block a user