mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-21 17:51:38 +03:00
10 lines
307 B
TypeScript
10 lines
307 B
TypeScript
import { Signal } from '@blocksuite/store';
|
|
|
|
export const getDataCenter = async () => {
|
|
const dataCenter = await import('../src/index.js');
|
|
return await dataCenter.getDataCenter(false);
|
|
};
|
|
|
|
export const waitOnce = <T>(signal: Signal<T>) =>
|
|
new Promise<T>(resolve => signal.once(val => resolve(val)));
|