Skip to content

API > @blocksuite/block-std > CommandManager

Class: CommandManager ​

Constructors ​

constructor ​

new CommandManager(std): CommandManager

Parameters ​

ParameterType
stdBlockStdProvider

Returns ​

CommandManager

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 ​

InitCommandCtx

Defined In ​

block-std/src/command/index.ts:68


add ​

add<N>(name, command): CommandManager

Type parameters ​

Parameter
N extends never

Parameters ​

ParameterType
nameN
commandCommands[N]

Returns ​

CommandManager

Defined In ​

block-std/src/command/index.ts:74


createChain ​

createChain(methods, cmds): Chain< {} >

Parameters ​

ParameterType
methodsRecord< never, unknown >
cmdsCommand< 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