fix(editor): remove ts ignore (#9567)

This commit is contained in:
Saul-Mirone
2025-01-07 08:48:05 +00:00
parent 474b01aad7
commit 5e51018c03
2 changed files with 5 additions and 14 deletions

View File

@@ -10,28 +10,21 @@ export * from './transformer';
export { type IdGenerator, nanoid, uuidv4 } from './utils/id-generator';
export * from './yjs';
const env =
const env = (
typeof globalThis !== 'undefined'
? globalThis
: typeof window !== 'undefined'
? window
: // oxlint-disable-next-line
// @ts-ignore FIXME: typecheck error
typeof global !== 'undefined'
? // oxlint-disable-next-line
// @ts-ignore FIXME: typecheck error
global
: {};
: typeof global !== 'undefined'
? global
: {}
) as Record<string, boolean>;
const importIdentifier = '__ $BLOCKSUITE_STORE$ __';
// oxlint-disable-next-line
// @ts-ignore FIXME: typecheck error
if (env[importIdentifier] === true) {
// https://github.com/yjs/yjs/issues/438
console.error(
'@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;