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:
@ -1,5 +1,5 @@
|
||||
import {Component, View, NgFor} from 'angular2/angular2';
|
||||
import {Jsonp} from 'angular2/http';
|
||||
import {Jsonp, Response} from 'angular2/http';
|
||||
import {ObservableWrapper} from 'angular2/src/facade/async';
|
||||
|
||||
@Component({selector: 'jsonp-app'})
|
||||
@ -17,7 +17,7 @@ import {ObservableWrapper} from 'angular2/src/facade/async';
|
||||
export class JsonpCmp {
|
||||
people: Object;
|
||||
constructor(jsonp: Jsonp) {
|
||||
ObservableWrapper.subscribe(jsonp.get('./people.json?callback=JSONP_CALLBACK'),
|
||||
res => this.people = res.json());
|
||||
ObservableWrapper.subscribe<Response>(jsonp.get('./people.json?callback=JSONP_CALLBACK'),
|
||||
res => this.people = res.json());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user