mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(editor): remove global types in model (#10082)
Closes: [BS-2249](https://linear.app/affine-design/issue/BS-2249/remove-global-types-in-model) ```ts // before matchFlavours(model, ['affine:page']); // after matchFlavours(model, [PageBlockModel]); ```
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import type {
|
||||
DatabaseBlockModel,
|
||||
RootBlockModel,
|
||||
import {
|
||||
CodeBlockModel,
|
||||
type DatabaseBlockModel,
|
||||
ListBlockModel,
|
||||
ParagraphBlockModel,
|
||||
type RootBlockModel,
|
||||
} from '@blocksuite/affine-model';
|
||||
import { REFERENCE_NODE } from '@blocksuite/affine-shared/consts';
|
||||
import { TelemetryProvider } from '@blocksuite/affine-shared/services';
|
||||
@@ -73,9 +76,9 @@ export class NoteRenderer
|
||||
.find(child => child.flavour === 'affine:note')
|
||||
?.children.find(block =>
|
||||
matchFlavours(block, [
|
||||
'affine:paragraph',
|
||||
'affine:list',
|
||||
'affine:code',
|
||||
ParagraphBlockModel,
|
||||
ListBlockModel,
|
||||
CodeBlockModel,
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user