mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
fix(editor): remove ts ignore (#9567)
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-restricted-imports */
|
/* eslint-disable @typescript-eslint/no-restricted-imports */
|
||||||
|
|
||||||
// oxlint-disable-next-line
|
|
||||||
// @ts-ignore FIXME: typecheck error
|
|
||||||
export * from '@blocksuite/store';
|
export * from '@blocksuite/store';
|
||||||
|
|||||||
@@ -10,28 +10,21 @@ export * from './transformer';
|
|||||||
export { type IdGenerator, nanoid, uuidv4 } from './utils/id-generator';
|
export { type IdGenerator, nanoid, uuidv4 } from './utils/id-generator';
|
||||||
export * from './yjs';
|
export * from './yjs';
|
||||||
|
|
||||||
const env =
|
const env = (
|
||||||
typeof globalThis !== 'undefined'
|
typeof globalThis !== 'undefined'
|
||||||
? globalThis
|
? globalThis
|
||||||
: typeof window !== 'undefined'
|
: typeof window !== 'undefined'
|
||||||
? window
|
? window
|
||||||
: // oxlint-disable-next-line
|
: typeof global !== 'undefined'
|
||||||
// @ts-ignore FIXME: typecheck error
|
? global
|
||||||
typeof global !== 'undefined'
|
: {}
|
||||||
? // oxlint-disable-next-line
|
) as Record<string, boolean>;
|
||||||
// @ts-ignore FIXME: typecheck error
|
|
||||||
global
|
|
||||||
: {};
|
|
||||||
const importIdentifier = '__ $BLOCKSUITE_STORE$ __';
|
const importIdentifier = '__ $BLOCKSUITE_STORE$ __';
|
||||||
|
|
||||||
// oxlint-disable-next-line
|
|
||||||
// @ts-ignore FIXME: typecheck error
|
|
||||||
if (env[importIdentifier] === true) {
|
if (env[importIdentifier] === true) {
|
||||||
// https://github.com/yjs/yjs/issues/438
|
// https://github.com/yjs/yjs/issues/438
|
||||||
console.error(
|
console.error(
|
||||||
'@blocksuite/store was already imported. This breaks constructor checks and will lead to issues!'
|
'@blocksuite/store was already imported. This breaks constructor checks and will lead to issues!'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// oxlint-disable-next-line
|
|
||||||
// @ts-ignore FIXME: typecheck error
|
|
||||||
env[importIdentifier] = true;
|
env[importIdentifier] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user