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:
@ -56,5 +56,5 @@ export class TodoApp {
|
||||
this.todoStore.list.forEach((todo: Todo) => { todo.completed = this.isComplete; });
|
||||
}
|
||||
|
||||
clearCompleted(): void { this.todoStore.removeBy((todo) => todo.completed); }
|
||||
clearCompleted(): void { this.todoStore.removeBy((todo: Todo) => todo.completed); }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Injectable} from 'angular2/angular2';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {ListWrapper, Predicate} from 'angular2/src/facade/collection';
|
||||
|
||||
// base model for RecordStore
|
||||
export class KeyModel {
|
||||
@ -34,7 +34,7 @@ export class Store {
|
||||
|
||||
remove(record: KeyModel): void { this._spliceOut(record); }
|
||||
|
||||
removeBy(callback: Function): void {
|
||||
removeBy(callback: Predicate<KeyModel>): void {
|
||||
var records = ListWrapper.filter(this.list, callback);
|
||||
ListWrapper.removeAll(this.list, records);
|
||||
}
|
||||
|
Reference in New Issue
Block a user