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

@@ -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';

View File

@@ -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;