chore(build): enable type-checking for TypeScript ES6 emit.

This requires delicate handling of type definitions which collide, because
we use TypeScript-provided lib.d.ts for --target=es5 and lib.es6.d.ts for
--target=es6.
We need to include our polyfill typings only in the --target=es5 case,
and the usages have to be consistent with lib.es6.d.ts.
Also starting with this change we now typecheck additional modules,
so this fixes a bunch of wrong typings which were never checked before.

Fixes #3178
This commit is contained in:
Alex Eagle
2015-08-06 09:52:33 -07:00
parent 40a3cd2ab1
commit 643c71740e
35 changed files with 88 additions and 83 deletions

View File

@ -66,7 +66,7 @@ export class RawEntity {
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = _resolve(pieces, this);
var target = this._resolve(pieces, this);
if (target == null) {
return null;
}
@ -81,7 +81,7 @@ export class RawEntity {
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = _resolve(pieces, this);
var target = this._resolve(pieces, this);
target[last] = value;
}
@ -92,7 +92,7 @@ export class RawEntity {
var pieces = key.split('.');
var last = ListWrapper.last(pieces);
pieces.length = pieces.length - 1;
var target = _resolve(pieces, this);
var target = this._resolve(pieces, this);
return target.remove(last);
}

View File

@ -9,6 +9,6 @@ export function main() {
bootstrap(App, createBindings());
}
function createBindings(): List {
function createBindings(): List<any> {
return [bind(APP_VIEW_POOL_CAPACITY).toValue(100000)];
}

View File

@ -207,7 +207,7 @@ class BaseLineIf {
this.component = null;
}
if (this.condition) {
var element = DOM.firstChild(DOM.clone(BASELINE_IF_TEMPLATE).content);
var element = DOM.firstChild((<any>DOM.clone(BASELINE_IF_TEMPLATE)).content);
this.anchor.parentNode.insertBefore(element, DOM.nextSibling(this.anchor));
this.component = new BaseLineTreeComponent(DOM.firstChild(element));
}