Skip to content

BlockSuite API Documentation / @blocksuite/block-std / CommandManager

Class: CommandManager

Constructors

new CommandManager(std)

new CommandManager(std): CommandManager

Parameters

std: BlockStdScope

Returns

CommandManager

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

Chain

Source

block-std/src/command/manager.ts:15


_getCommandCtx()

private _getCommandCtx(): InitCommandCtx

Returns

InitCommandCtx

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

CommandManager

Source

block-std/src/command/manager.ts:124


chain()

chain(): Chain<InitCommandCtx>

Returns

Chain<InitCommandCtx>

Source

block-std/src/command/manager.ts:133