mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-31 21:59:10 +08:00
feat(server): cluster level event system (#9884)
This commit is contained in:
@@ -1,22 +1,7 @@
|
||||
import { FlattenedAppRuntimeConfig } from '../config/types';
|
||||
import { OnEvent } from '../event';
|
||||
import { Payload } from '../event/def';
|
||||
|
||||
declare module '../event/def' {
|
||||
interface EventDefinitions {
|
||||
runtime: {
|
||||
[K in keyof FlattenedAppRuntimeConfig]: {
|
||||
changed: Payload<FlattenedAppRuntimeConfig[K]>;
|
||||
};
|
||||
};
|
||||
declare global {
|
||||
interface Events {
|
||||
'runtime.changed__NOT_IMPLEMENTED__': Partial<FlattenedAppRuntimeConfig>;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* not implemented yet
|
||||
*/
|
||||
export const OnRuntimeConfigChange_DO_NOT_USE = (
|
||||
nameWithModule: keyof FlattenedAppRuntimeConfig
|
||||
) => {
|
||||
return OnEvent(`runtime.${nameWithModule}.changed`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user