mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
chore: rename fundamentals to base (#9119)
This commit is contained in:
22
packages/backend/server/src/base/config/runtime/event.ts
Normal file
22
packages/backend/server/src/base/config/runtime/event.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { OnEvent } from '../../event';
|
||||
import { Payload } from '../../event/def';
|
||||
import { FlattenedAppRuntimeConfig } from '../types';
|
||||
|
||||
declare module '../../event/def' {
|
||||
interface EventDefinitions {
|
||||
runtimeConfig: {
|
||||
[K in keyof FlattenedAppRuntimeConfig]: {
|
||||
changed: Payload<FlattenedAppRuntimeConfig[K]>;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* not implemented yet
|
||||
*/
|
||||
export const OnRuntimeConfigChange_DO_NOT_USE = (
|
||||
nameWithModule: keyof FlattenedAppRuntimeConfig
|
||||
) => {
|
||||
return OnEvent(`runtimeConfig.${nameWithModule}.changed`);
|
||||
};
|
||||
Reference in New Issue
Block a user