chore: rename src/ to server/
This commit is contained in:
13
server/api/BaseApi.ts
Normal file
13
server/api/BaseApi.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import EventCallbackFunction from "../types/EventCallbackFunction.ts"
|
||||
import ApiManager from "./ApiManager.ts";
|
||||
|
||||
export default abstract class BaseApi {
|
||||
abstract getName(): string
|
||||
constructor() {
|
||||
this.onInit()
|
||||
}
|
||||
abstract onInit(): void
|
||||
registerEvent(name: string, func: EventCallbackFunction) {
|
||||
ApiManager.addEventListener(this.getName() + "." + name, func)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user