Resolve a couple tslint warnings.
This commit is contained in:
@@ -23,7 +23,7 @@ function assertInt32(target: any, key: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function assertCompactLength(target: any, key: string) {
|
function assertCompactLength(target: any, key: string) {
|
||||||
return assertUInt16(target, key)
|
return assertUInt16(target, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
function assertInteger(target: any, key: string, min: number, max: number) {
|
function assertInteger(target: any, key: string, min: number, max: number) {
|
||||||
@@ -64,5 +64,5 @@ function assertEnum<E>(enumerated: E) {
|
|||||||
configurable: true
|
configurable: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class DualRoleKeystrokeAction extends KeyAction {
|
|||||||
_fromJsObject(jsObject: any): DualRoleKeystrokeAction {
|
_fromJsObject(jsObject: any): DualRoleKeystrokeAction {
|
||||||
this.assertKeyActionType(jsObject, KeyActionType.DualRoleKeystrokeAction, 'DualRoleKeystrokeAction');
|
this.assertKeyActionType(jsObject, KeyActionType.DualRoleKeystrokeAction, 'DualRoleKeystrokeAction');
|
||||||
this.scancode = jsObject.scancode;
|
this.scancode = jsObject.scancode;
|
||||||
this.longPressAction = LongPressAction[<string>jsObject.longPressAction];
|
this.longPressAction = LongPressAction[<string> jsObject.longPressAction];
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ let KeyActionType = {
|
|||||||
SwitchKeymapAction : 'switchKeymap',
|
SwitchKeymapAction : 'switchKeymap',
|
||||||
MouseAction : 'mouse',
|
MouseAction : 'mouse',
|
||||||
PlayMacroAction : 'playMacro'
|
PlayMacroAction : 'playMacro'
|
||||||
}
|
};
|
||||||
|
|
||||||
abstract class KeyAction extends Serializable<KeyAction> {
|
abstract class KeyAction extends Serializable<KeyAction> {
|
||||||
assertKeyActionType(jsObject: any, keyActionTypeString: string, classname: string) {
|
assertKeyActionType(jsObject: any, keyActionTypeString: string, classname: string) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class MouseAction extends KeyAction {
|
|||||||
|
|
||||||
_fromJsObject(jsObject: any): MouseAction {
|
_fromJsObject(jsObject: any): MouseAction {
|
||||||
this.assertKeyActionType(jsObject, KeyActionType.MouseAction, 'MouseAction');
|
this.assertKeyActionType(jsObject, KeyActionType.MouseAction, 'MouseAction');
|
||||||
this.mouseAction = MouseActionParam[<string>jsObject.mouseAction];
|
this.mouseAction = MouseActionParam[<string> jsObject.mouseAction];
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SwitchLayerAction extends KeyAction {
|
|||||||
|
|
||||||
_fromJsObject(jsObject: any): SwitchLayerAction {
|
_fromJsObject(jsObject: any): SwitchLayerAction {
|
||||||
this.assertKeyActionType(jsObject, KeyActionType.SwitchLayerAction, 'SwitchLayerAction');
|
this.assertKeyActionType(jsObject, KeyActionType.SwitchLayerAction, 'SwitchLayerAction');
|
||||||
this.layer = Layer[<string>jsObject.layer];
|
this.layer = Layer[<string> jsObject.layer];
|
||||||
this.isLayerToggleable = jsObject.toggle;
|
this.isLayerToggleable = jsObject.toggle;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user