mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 12:32:00 +08: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,4 +1,5 @@
|
||||
import { correctNumberedListsOrderToPrev } from '@blocksuite/affine-block-list';
|
||||
import { ListBlockModel } from '@blocksuite/affine-model';
|
||||
import { matchFlavours } from '@blocksuite/affine-shared/utils';
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import type { TransformerMiddleware } from '@blocksuite/store';
|
||||
@@ -10,7 +11,7 @@ export const reorderList =
|
||||
if (payload.type === 'block') {
|
||||
const model = payload.model;
|
||||
if (
|
||||
matchFlavours(model, ['affine:list']) &&
|
||||
matchFlavours(model, [ListBlockModel]) &&
|
||||
model.type === 'numbered'
|
||||
) {
|
||||
const next = std.store.getNext(model);
|
||||
|
||||
Reference in New Issue
Block a user