Make KeyAction.assertKeyActiontype() and KeyAction.readAndAssertKeyActionId() only expect a single argument.
This commit is contained in:
@@ -20,13 +20,13 @@ class MouseAction extends KeyAction {
|
||||
mouseAction: MouseActionParam;
|
||||
|
||||
_fromJsObject(jsObject: any): MouseAction {
|
||||
this.assertKeyActionType(jsObject, keyActionType.MouseAction, 'MouseAction');
|
||||
this.assertKeyActionType(jsObject);
|
||||
this.mouseAction = MouseActionParam[<string> jsObject.mouseAction];
|
||||
return this;
|
||||
}
|
||||
|
||||
_fromBinary(buffer: UhkBuffer): MouseAction {
|
||||
this.readAndAssertKeyActionId(buffer, KeyActionId.MouseAction, 'MouseAction');
|
||||
this.readAndAssertKeyActionId(buffer);
|
||||
this.mouseAction = buffer.readUInt8();
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user