From 971e31fcd3ad3b28a9942775da91f386e44e7da6 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 7 Oct 2014 09:37:23 -0400 Subject: [PATCH] feat(facade): add bool type --- modules/facade/src/lang.es6 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/facade/src/lang.es6 b/modules/facade/src/lang.es6 index bee94c2a9a..848b74d80e 100644 --- a/modules/facade/src/lang.es6 +++ b/modules/facade/src/lang.es6 @@ -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); }