diff --git a/modules/change_detection/test/parser/scanner_spec.js b/modules/change_detection/test/parser/scanner_spec.js index e4a22b698c..2473212447 100644 --- a/modules/change_detection/test/parser/scanner_spec.js +++ b/modules/change_detection/test/parser/scanner_spec.js @@ -1,7 +1,7 @@ import {describe, it, expect} from 'test_lib/test_lib'; import {Scanner, Token} from 'change_detection/parser/scanner'; import {List, ListWrapper} from "facade/collection"; -import {StringWrapper} from "facade/lang"; +import {StringWrapper, int} from "facade/lang"; function lex(text:string):List { var scanner:Scanner = new Scanner(text); diff --git a/modules/core/src/compiler/element_injector.js b/modules/core/src/compiler/element_injector.js index d7bf8a1832..439d0db497 100644 --- a/modules/core/src/compiler/element_injector.js +++ b/modules/core/src/compiler/element_injector.js @@ -49,7 +49,7 @@ export class ProtoElementInjector { queryKeyId1:int; textNodes:List; - hasProperties:bool; + hasProperties:boolean; events:Map; elementInjector:ElementInjector; diff --git a/modules/core/src/compiler/view.js b/modules/core/src/compiler/view.js index 49d3a05d0f..150eec3109 100644 --- a/modules/core/src/compiler/view.js +++ b/modules/core/src/compiler/view.js @@ -5,7 +5,7 @@ import {Record} from 'change_detection/record'; import {Module} from 'di/di'; import {ProtoElementInjector, ElementInjector} from './element_injector'; import {SetterFn} from 'change_detection/facade'; -import {FIELD, IMPLEMENTS} from 'facade/lang'; +import {FIELD, IMPLEMENTS, int} from 'facade/lang'; import {List} from 'facade/collection'; /*** @@ -61,7 +61,7 @@ export class ProtoView { module:Module, protoElementInjector:List, protoWatchGroup:ProtoWatchGroup, - useRootElement:bool) + useRootElement:boolean) { this._template = template; this._module = module; diff --git a/modules/core/test/compiler/view_spec.js b/modules/core/test/compiler/view_spec.js index d76b4b7861..cf3d6ab5b6 100644 --- a/modules/core/test/compiler/view_spec.js +++ b/modules/core/test/compiler/view_spec.js @@ -32,7 +32,7 @@ export function main() { spanPI.hasProperties = true; var protoElementInjector:List = [sectionPI, divPI, spanPI]; var protoWatchGroup:ProtoWatchGroup = null; - var hasSingleRoot:bool = false; + var hasSingleRoot:boolean = false; var pv = new ProtoView(template, module, protoElementInjector, protoWatchGroup, hasSingleRoot); var view:View = pv.instantiate(); var section:Element = template.content.firstChild; diff --git a/modules/di/src/binding.js b/modules/di/src/binding.js index 5fc98aec15..3ceb28a9f4 100644 --- a/modules/di/src/binding.js +++ b/modules/di/src/binding.js @@ -1,4 +1,4 @@ -import {FIELD, Type, bool, isBlank} from 'facade/lang'; +import {FIELD, Type, isBlank} from 'facade/lang'; import {List, MapWrapper, ListWrapper} from 'facade/collection'; import {reflector} from './reflector'; import {Key} from './key'; @@ -7,7 +7,7 @@ export class Dependency { @FIELD('final key:Key') @FIELD('final asFuture:bool') @FIELD('final lazy:bool') - constructor(key:Key, asFuture:bool, lazy:bool) { + constructor(key:Key, asFuture:boolean, lazy:boolean) { this.key = key; this.asFuture = asFuture; this.lazy = lazy; @@ -15,7 +15,7 @@ export class Dependency { } export class Binding { - constructor(key:Key, factory:Function, dependencies:List, providedAsFuture:bool) { + constructor(key:Key, factory:Function, dependencies:List, providedAsFuture:boolean) { this.key = key; this.factory = factory; this.dependencies = dependencies; diff --git a/modules/di/src/injector.js b/modules/di/src/injector.js index b5bb6cf2c2..93270c17c0 100644 --- a/modules/di/src/injector.js +++ b/modules/di/src/injector.js @@ -2,7 +2,7 @@ import {Map, List, MapWrapper, ListWrapper} from 'facade/collection'; import {Binding, BindingBuilder, bind} from './binding'; import {ProviderError, NoProviderError, InvalidBindingError, AsyncBindingError, CyclicDependencyError, InstantiationError} from './exceptions'; -import {Type, isPresent, isBlank, bool} from 'facade/lang'; +import {Type, isPresent, isBlank} from 'facade/lang'; import {Future, FutureWrapper} from 'facade/async'; import {Key} from './key'; @@ -13,7 +13,7 @@ class _Waiting { this.future = future; } } -function _isWaiting(obj):bool { +function _isWaiting(obj):boolean { return obj instanceof _Waiting; } @@ -52,7 +52,7 @@ export class Injector { return ListWrapper.createFixedSize(Key.numberOfKeys() + 1); } - _getByKey(key:Key, returnFuture:bool, returnLazy:bool) { + _getByKey(key:Key, returnFuture:boolean, returnLazy:boolean) { if (returnLazy) { return () => this._getByKey(key, returnFuture, false); } @@ -71,7 +71,7 @@ export class Injector { throw new NoProviderError(key); } - _resolveDependencies(key:Key, binding:Binding, forceAsync:bool):List { + _resolveDependencies(key:Key, binding:Binding, forceAsync:boolean):List { try { var getDependency = d => this._getByKey(d.key, forceAsync || d.asFuture, d.lazy); return ListWrapper.map(binding.dependencies, getDependency); diff --git a/modules/di/src/key.js b/modules/di/src/key.js index a7df7fbdc0..cbf324573b 100644 --- a/modules/di/src/key.js +++ b/modules/di/src/key.js @@ -1,5 +1,5 @@ import {MapWrapper} from 'facade/collection'; -import {FIELD, int, bool} from 'facade/lang'; +import {FIELD, int} from 'facade/lang'; var _allKeys = {}; var _id:int = 0; diff --git a/modules/facade/src/lang.es6 b/modules/facade/src/lang.es6 index d32b79f9f0..170ca503f9 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):bool{ +export function isPresent(obj):boolean { return obj != undefined && obj != null; } -export function isBlank(obj):bool{ +export function isBlank(obj):boolean { return obj == undefined || obj == null; } @@ -104,7 +104,6 @@ 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); }