Skip to content

@jsvision/code-editor / CodeEditorKeyBindingConflictError

Class: CodeEditorKeyBindingConflictError ​

Defined in: code-editor/src/ui/keybindings.ts:34

Describes an unsafe canonical binding collision without hiding either command.

Example ​

ts
if (error instanceof CodeEditorKeyBindingConflictError) console.error(error.binding);

Extends ​

  • Error

Constructors ​

Constructor ​

new CodeEditorKeyBindingConflictError(binding, existingCommand, incomingCommand): CodeEditorKeyBindingConflictError

Defined in: code-editor/src/ui/keybindings.ts:49

Creates a descriptive collision error.

Parameters ​

binding ​

string

Canonical key token that collided.

existingCommand ​

CodeEditorCommand

Command already registered.

incomingCommand ​

CodeEditorCommand

Command rejected by the registry.

Returns ​

CodeEditorKeyBindingConflictError

Overrides ​

Error.constructor

Properties ​

binding ​

readonly binding: string

Defined in: code-editor/src/ui/keybindings.ts:36

Canonical key token shared by both commands.


existingCommand ​

readonly existingCommand: CodeEditorCommand

Defined in: code-editor/src/ui/keybindings.ts:38

Command already registered for the canonical token.


incomingCommand ​

readonly incomingCommand: CodeEditorCommand

Defined in: code-editor/src/ui/keybindings.ts:40

Command that attempted to claim the same canonical token.