Skip to content

charton API


charton API / @chart-on/ui / index / CommandEntry

Interface: CommandEntry ​

Defined in: ui/src/command-palette-model.ts:8

One row of the command palette.

Properties ​

checked? ​

optional checked?: boolean

Defined in: ui/src/command-palette-model.ts:19

For toggles: whether it is on. Leave out for plain commands.


description? ​

optional description?: string

Defined in: ui/src/command-palette-model.ts:13

Secondary text, e.g. an exchange or a group; searched with a lower weight.


disabled? ​

optional disabled?: boolean

Defined in: ui/src/command-palette-model.ts:21

Listed, but cannot run now. Disabled entries rank after the enabled ones.


id ​

id: string

Defined in: ui/src/command-palette-model.ts:10

Unique within its source.


keywords? ​

optional keywords?: readonly string[]

Defined in: ui/src/command-palette-model.ts:15

Other words that find the entry, e.g. abbreviations.


label ​

label: string

Defined in: ui/src/command-palette-model.ts:11


shortcut? ​

optional shortcut?: string

Defined in: ui/src/command-palette-model.ts:17

Shortcut shown at the end of the row, in chart.actions form ('Mod+Z').

Methods ​

run() ​

run(): void

Defined in: ui/src/command-palette-model.ts:23

Do it. Called after the palette closed and gave focus back.

Returns ​

void