refactor(editor): remove global types in config (#10143)

Closes: [BS-2554](https://linear.app/affine-design/issue/BS-2554/remove-global-types-in-block-config)
This commit is contained in:
Saul-Mirone
2025-02-13 04:35:35 +00:00
parent dbf1d0038a
commit 9321ce94a7
34 changed files with 98 additions and 153 deletions

View File

@@ -859,13 +859,3 @@ describe('getBlock', () => {
assert.equal(invalid, null);
});
});
declare global {
namespace BlockSuite {
interface BlockModels {
'affine:page': BlockModel;
'affine:paragraph': BlockModel;
'affine:note': BlockModel;
}
}
}

View File

@@ -1,7 +1,6 @@
import { literal } from 'lit/static-html.js';
import { describe, expect, it, vi } from 'vitest';
import type { BlockModel } from '../model/block/block-model.js';
import { defineBlockSchema } from '../model/block/zod.js';
// import some blocks
import { SchemaValidateError } from '../schema/error.js';
@@ -124,12 +123,3 @@ describe('schema', () => {
});
});
});
declare global {
namespace BlockSuite {
interface BlockModels {
'affine:note-block-video': BlockModel;
'affine:note-invalid-block-video': BlockModel;
}
}
}

View File

@@ -133,11 +133,3 @@ test('snapshot to model', async () => {
expect(item.content.toString()).toBe(`item ${index + 1}`);
});
});
declare global {
namespace BlockSuite {
interface BlockModels {
page: BlockModel;
}
}
}