Remove TypeChecker.
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
class TypeChecker {
|
||||
|
||||
static firstValidScancode = 1;
|
||||
static lastValidScancode = 231;
|
||||
|
||||
static isUInt8Valid(uint8: number): boolean {
|
||||
return 0 <= uint8 && uint8 <= 255;
|
||||
}
|
||||
|
||||
static isScancodeValid(scancode: number): boolean {
|
||||
return TypeChecker.firstValidScancode <= scancode && scancode <= TypeChecker.lastValidScancode;
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ class KeystrokeAction extends KeyAction {
|
||||
}
|
||||
|
||||
set scancode(value) {
|
||||
if (!TypeChecker.isScancodeValid(value)) {
|
||||
throw `Invalid KeystrokeAction.scancode: ${value}`;
|
||||
}
|
||||
this._scancode = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ class KeystrokeWithModifiersAction extends KeyAction {
|
||||
}
|
||||
|
||||
set scancode(value) {
|
||||
if (!TypeChecker.isScancodeValid(value)) {
|
||||
throw `Invalid KeystrokeWithModifiersAction.scancode: ${value}`;
|
||||
}
|
||||
this._scancode = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,6 @@ class PlayMacroAction extends KeyAction {
|
||||
}
|
||||
|
||||
set macroId(value) {
|
||||
if (!TypeChecker.isUInt8Valid(value)) {
|
||||
throw `Invalid PlayMacroAction.macroId: ${value}`;
|
||||
}
|
||||
this._macroId = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,6 @@ class SwitchKeymapAction extends KeyAction {
|
||||
}
|
||||
|
||||
set keymapId(value) {
|
||||
if (!TypeChecker.isUInt8Valid(value)) {
|
||||
throw `Invalid SwitchKeymapAction.keymapId: ${value}`;
|
||||
}
|
||||
this._keymapId = value;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/// <reference path="assert.ts" />
|
||||
/// <reference path="TypeChecker.ts" />
|
||||
/// <reference path="Serializable.ts" />
|
||||
/// <reference path="ClassArray.ts" />
|
||||
/// <reference path="UhkBuffer.ts" />
|
||||
|
||||
Reference in New Issue
Block a user