Add TypeChecker and use its methods wherever possible.
This commit is contained in:
@@ -17,7 +17,7 @@ class KeyAction {
|
||||
let keyActionFirstByte = buffer.readUInt8();
|
||||
buffer.backtrack();
|
||||
|
||||
if (KeystrokeAction.isScancodeValid(keyActionFirstByte)) {
|
||||
if (TypeChecker.isScancodeValid(keyActionFirstByte)) {
|
||||
return new KeystrokeAction().fromBinary(buffer);
|
||||
} else if (keyActionFirstByte === MouseAction.keyActionId) {
|
||||
return new MouseAction().fromBinary(buffer);
|
||||
|
||||
Reference in New Issue
Block a user