Add assertion decorations for various numeric types.

This commit is contained in:
László Monda
2016-04-08 22:26:00 +02:00
parent 49d0ad270b
commit f6eb819cfe
9 changed files with 48 additions and 87 deletions

View File

@@ -12,18 +12,7 @@ class SwitchLayerAction extends KeyAction {
@assertEnum(Layer)
private layer: Layer;
/*
get layer(): number {
return this._layer;
}
set layer(value) {
if (!TypeChecker.isUInt8Valid(value)) {
throw 'Invalid SwitchLayerAction.layerId: ${value}';
}
this._layer = value;
}
*/
getToggleFlag() {
return this.isLayerToggleable ? SwitchLayerAction.toggleFlag : 0;
}