Skip to main content

Interface: CommandRegistryOf<TGantt, TDataset>

Defined in: api/command.ts:222

Register once, run by id, list what a CommandContext currently allows. run throws UnknownCommandError for an id nothing owns; a registered command whose when declines is a silent no-op, the same posture available's own filter takes.

Type Parameters​

TGantt​

TGantt = unknown

TDataset​

TDataset = Dataset

Methods​

available()​

available(ctx?): readonly CommandOf<TGantt, TDataset>[]

Defined in: api/command.ts:232

Commands whose when passes for this context, in registration order. #160: ctx is optional — omit it and the registry builds the same live context run(id) already builds internally, so a caller never hand-assembles one just to answer "what can run right now?".

Parameters​

ctx?​

CommandContextOf<TGantt, TDataset>

Returns​

readonly CommandOf<TGantt, TDataset>[]


register()​

register(command): Disposer

Defined in: api/command.ts:227

#155: registering an id a command already holds stacks on top of it rather than replacing it. The newest registration answers run, and the returned Disposer removes exactly this one — the command underneath then answers again, which is how a plugin's override of a core command undoes itself when that plugin is uninstalled.

Parameters​

command​

CommandOf<TGantt, TDataset>

Returns​

Disposer


run()​

run(id): void

Defined in: api/command.ts:228

Parameters​

id​

CommandId

Returns​

void