Skip to content

Commit

Permalink
feat(web): make properties of KMXKeyboard read-only
Browse files Browse the repository at this point in the history
Addresses code review comment.
  • Loading branch information
ermshiperete committed Jan 20, 2025
1 parent 08b261c commit 2bf58bc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions web/src/engine/keyboard/src/keyboards/kmxKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { km_core_keyboard } from 'keyman/engine/core-processor';
export class KMXKeyboard {

constructor(id: string, keyboard: km_core_keyboard) {
this.id = id;
this.keyboard = keyboard;
this._id = id;
this._keyboard = keyboard;
}

id: string;
keyboard: km_core_keyboard;
private _id: string;
private _keyboard: km_core_keyboard;

get isMnemonic(): boolean {
return false;
Expand All @@ -21,4 +21,12 @@ export class KMXKeyboard {
// TODO-web-core: get version from `km_core_keyboard_get_attrs`
return '';
}

get id(): string {
return this._id;
}

get keyboard(): km_core_keyboard {
return this._keyboard;
}
}

0 comments on commit 2bf58bc

Please sign in to comment.