Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

Saul-Mirone5e51018c03fb
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<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;