mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 10:31:50 +08:00
feat(infra): framework
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export { GlobalCache, GlobalState } from './providers/global';
|
||||
export { GlobalCacheService, GlobalStateService } from './services/global';
|
||||
|
||||
import type { Framework } from '../../framework';
|
||||
import { MemoryMemento } from '../../storage';
|
||||
import { GlobalCache, GlobalState } from './providers/global';
|
||||
import { GlobalCacheService, GlobalStateService } from './services/global';
|
||||
|
||||
export const configureGlobalStorageModule = (framework: Framework) => {
|
||||
framework.service(GlobalStateService, [GlobalState]);
|
||||
framework.service(GlobalCacheService, [GlobalCache]);
|
||||
};
|
||||
|
||||
export const configureTestingGlobalStorage = (framework: Framework) => {
|
||||
framework.impl(GlobalCache, MemoryMemento);
|
||||
framework.impl(GlobalState, MemoryMemento);
|
||||
};
|
||||
Reference in New Issue
Block a user