Add TypeChecker and use its methods wherever possible.

This commit is contained in:
László Monda
2016-03-30 01:59:05 +02:00
parent 94e5d55d8f
commit 0edde3236a
7 changed files with 18 additions and 20 deletions
+1 -1
View File
@@ -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);