Rename Keybinding.targetSelector to targetElementId (#2169)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-01-05 16:03:38 -05:00
committed by GitHub
parent 477f4b275d
commit 975c2248c5
11 changed files with 52 additions and 16 deletions

View File

@@ -6,12 +6,12 @@ import { KeyCombo, Keybinding } from '@/types/keyBindingTypes'
export class KeybindingImpl implements Keybinding {
commandId: string
combo: KeyComboImpl
targetSelector?: string
targetElementId?: string
constructor(obj: Keybinding) {
this.commandId = obj.commandId
this.combo = new KeyComboImpl(obj.combo)
this.targetSelector = obj.targetSelector
this.targetElementId = obj.targetElementId
}
equals(other: unknown): boolean {
@@ -20,7 +20,7 @@ export class KeybindingImpl implements Keybinding {
return raw instanceof KeybindingImpl
? this.commandId === raw.commandId &&
this.combo.equals(raw.combo) &&
this.targetSelector === raw.targetSelector
this.targetElementId === raw.targetElementId
: false
}
}