feat(facade): add bool type
This commit is contained in:
parent
4e0c368c03
commit
971e31fcd3
|
@ -11,11 +11,11 @@ export class ABSTRACT {}
|
||||||
export class IMPLEMENTS {}
|
export class IMPLEMENTS {}
|
||||||
|
|
||||||
|
|
||||||
export function isPresent(obj){
|
export function isPresent(obj):bool{
|
||||||
return obj != undefined && obj != null;
|
return obj != undefined && obj != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isBlank(obj){
|
export function isBlank(obj):bool{
|
||||||
return obj == undefined || obj == null;
|
return obj == undefined || obj == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,6 +83,7 @@ export class NumberWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function int() {};
|
export function int() {};
|
||||||
|
export var bool = $traceurRuntime.type.boolean;
|
||||||
int.assert = function(value) {
|
int.assert = function(value) {
|
||||||
return value == null || typeof value == 'number' && value === Math.floor(value);
|
return value == null || typeof value == 'number' && value === Math.floor(value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue