mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
11 lines
300 B
TypeScript
11 lines
300 B
TypeScript
import { Signal } from '@blocksuite/store';
|
|
|
|
export const getDataCenter = () => {
|
|
return import('../src/index.js').then(async dataCenter =>
|
|
dataCenter.getDataCenter(false)
|
|
);
|
|
};
|
|
|
|
export const waitOnce = <T>(signal: Signal<T>) =>
|
|
new Promise<T>(resolve => signal.once(val => resolve(val)));
|