API > @blocksuite/block-std > CommandManager
Class: CommandManager ​
Constructors ​
constructor ​
new CommandManager(
std
):CommandManager
Parameters ​
Parameter | Type |
---|---|
std | BlockStdProvider |
Returns ​
Defined In ​
block-std/src/command/index.ts:66
Properties ​
_commands ​
private
_commands:Map
<string
,Command
<never
,never
, {} > >
Defined In ​
block-std/src/command/index.ts:64
std ​
std:
BlockStdProvider
Defined In ​
block-std/src/command/index.ts:66
Methods ​
_getCommandCtx ​
private
_getCommandCtx():InitCommandCtx
Returns ​
Defined In ​
block-std/src/command/index.ts:68
add ​
add<
N
>(name
,command
):CommandManager
Type parameters ​
Parameter |
---|
N extends never |
Parameters ​
Parameter | Type |
---|---|
name | N |
command | Commands [N ] |
Returns ​
Defined In ​
block-std/src/command/index.ts:74
createChain ​
createChain(
methods
,cmds
):Chain
< {} >
Parameters ​
Parameter | Type |
---|---|
methods | Record < never , unknown > |
cmds | Command < never , never , {} >[] |
Returns ​
Chain
< {} >
Defined In ​
block-std/src/command/index.ts:83
pipe ​
pipe():
Chain
<InitCommandCtx
>
Returns ​
Chain
< InitCommandCtx
>
Defined In ​
block-std/src/command/index.ts:148