mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +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:
@@ -1,6 +1,12 @@
|
||||
import { BlockSelection, type Command } from '@blocksuite/block-std';
|
||||
import {
|
||||
type BlockComponent,
|
||||
BlockSelection,
|
||||
type Command,
|
||||
} from '@blocksuite/block-std';
|
||||
|
||||
export const selectBlock: Command<'focusBlock'> = (ctx, next) => {
|
||||
export const selectBlock: Command<{
|
||||
focusBlock?: BlockComponent;
|
||||
}> = (ctx, next) => {
|
||||
const { focusBlock, std } = ctx;
|
||||
if (!focusBlock) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user