mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user