From 5e51018c03fb3acb37ebd5c23c53e6fafa3febd0 Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Tue, 7 Jan 2025 08:48:05 +0000 Subject: [PATCH] fix(editor): remove ts ignore (#9567) --- blocksuite/affine/all/src/store/index.ts | 2 -- blocksuite/framework/store/src/index.ts | 17 +++++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/blocksuite/affine/all/src/store/index.ts b/blocksuite/affine/all/src/store/index.ts index edab995ffc..c8021b01fc 100644 --- a/blocksuite/affine/all/src/store/index.ts +++ b/blocksuite/affine/all/src/store/index.ts @@ -1,5 +1,3 @@ /* eslint-disable @typescript-eslint/no-restricted-imports */ -// oxlint-disable-next-line -// @ts-ignore FIXME: typecheck error export * from '@blocksuite/store'; diff --git a/blocksuite/framework/store/src/index.ts b/blocksuite/framework/store/src/index.ts index 3fc25cfe15..526a50bbef 100644 --- a/blocksuite/framework/store/src/index.ts +++ b/blocksuite/framework/store/src/index.ts @@ -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; 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;