mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
23 lines
553 B
TypeScript
23 lines
553 B
TypeScript
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`);
|
|
};
|