Make test-serializer.ts serialize and deserialize the configuration.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
class NoneAction extends KeyAction implements Serializable<NoneAction> {
|
||||
|
||||
static noneActionParam = 0;
|
||||
|
||||
fromJsObject(jsObject: any): NoneAction {
|
||||
this.assertKeyActionType(jsObject, KeyActionType.NoneAction, 'NoneAction');
|
||||
return this;
|
||||
@@ -9,12 +7,6 @@ class NoneAction extends KeyAction implements Serializable<NoneAction> {
|
||||
|
||||
fromBinary(buffer: UhkBuffer): NoneAction {
|
||||
this.readAndAssertKeyActionId(buffer, KeyActionId.NoneAction, 'NoneAction');
|
||||
|
||||
let keyActionParam = buffer.readUInt8();
|
||||
if (keyActionParam !== NoneAction.noneActionParam) {
|
||||
throw `Invalid NoneAction.param: ${keyActionParam}`;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user