zwischenstand

This commit is contained in:
2024-02-13 16:36:09 +00:00
parent 7d8a07e8c4
commit efb67be9fe
184 changed files with 15832 additions and 1359 deletions

View File

@@ -0,0 +1,13 @@
const eventCallbacks: { [key: string]: any } = {}
export const registerEventCallback = (event: string | number, id: string | number, callback: any) => {
if (!eventCallbacks[event]) eventCallbacks[event] = {}
eventCallbacks[event][id] = callback
}
export const unregisterEventCallback = (event: string | number, id: string | number) => {
delete eventCallbacks[event][id]
}
export const getEventCallbacks = (event: string) => {
return eventCallbacks[event]
}