feat(facade): add bool type

This commit is contained in:
vsavkin 2014-10-07 09:37:23 -04:00
parent 4e0c368c03
commit 971e31fcd3
1 changed files with 3 additions and 2 deletions

View File

@ -11,11 +11,11 @@ export class ABSTRACT {}
export class IMPLEMENTS {}
export function isPresent(obj){
export function isPresent(obj):bool{
return obj != undefined && obj != null;
}
export function isBlank(obj){
export function isBlank(obj):bool{
return obj == undefined || obj == null;
}
@ -83,6 +83,7 @@ export class NumberWrapper {
}
export function int() {};
export var bool = $traceurRuntime.type.boolean;
int.assert = function(value) {
return value == null || typeof value == 'number' && value === Math.floor(value);
}