mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 21:48:48 +08:00
refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
This commit is contained in:
@@ -2,11 +2,11 @@ import { NoteDisplayMode } from '@blocksuite/affine-model';
|
||||
import { matchFlavours } from '@blocksuite/affine-shared/utils';
|
||||
import type { Command } from '@blocksuite/block-std';
|
||||
|
||||
export const changeNoteDisplayMode: Command<
|
||||
never,
|
||||
never,
|
||||
{ noteId: string; mode: NoteDisplayMode; stopCapture?: boolean }
|
||||
> = (ctx, next) => {
|
||||
export const changeNoteDisplayMode: Command<{
|
||||
noteId: string;
|
||||
mode: NoteDisplayMode;
|
||||
stopCapture?: boolean;
|
||||
}> = (ctx, next) => {
|
||||
const { std, noteId, mode, stopCapture } = ctx;
|
||||
|
||||
const noteBlockModel = std.store.getBlock(noteId)?.model;
|
||||
|
||||
Reference in New Issue
Block a user