BlockSuite API Documentation / @blocksuite/block-std / CommandManager
Class: CommandManager
Constructors
new CommandManager(std)
new CommandManager(
std
):CommandManager
Parameters
• std: BlockStdScope
Returns
Source
block-std/src/command/manager.ts:7
Properties
_commands
private
_commands:Map
<string
,Command
>
Source
block-std/src/command/manager.ts:5
std
std:
BlockStdScope
Source
block-std/src/command/manager.ts:7
Methods
_createChain()
private
_createChain(methods
,_cmds
):Chain
Parameters
• methods: Record
<keyof Commands
, unknown
>
• _cmds: Command
[]
Returns
Source
block-std/src/command/manager.ts:15
_getCommandCtx()
private
_getCommandCtx():InitCommandCtx
Returns
Source
block-std/src/command/manager.ts:9
add()
add<
N
>(name
,command
):CommandManager
Type parameters
• N extends keyof Commands
Parameters
• name: N
• command: Commands
[N
]
Returns
Source
block-std/src/command/manager.ts:124
chain()
chain():
Chain
<InitCommandCtx
>
Returns
Source
block-std/src/command/manager.ts:133