build(typescript): Migrated change detection to typescript

This commit is contained in:
vsavkin
2015-05-07 17:18:04 -07:00
parent f0ef72d6cc
commit fa28b28d0a
45 changed files with 2343 additions and 2576 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ export class PromiseWrapper {
export class ObservableWrapper {
static subscribe(emitter: EventEmitter, onNext, onThrow = null, onReturn = null) {
static subscribe(emitter: Observable, onNext, onThrow = null, onReturn = null): Object {
return emitter.observer({next: onNext, throw: onThrow, return: onReturn});
}
@@ -69,7 +69,7 @@ export class ObservableWrapper {
// TODO: vsavkin change to interface
export class Observable {
observer(generator: any) {}
observer(generator: any): Object { return null; }
}
/**
+3 -3
View File
@@ -117,9 +117,9 @@ export class ListWrapper {
static indexOf(array: List<any>, value, startIndex = -1) {
return array.indexOf(value, startIndex);
}
static reduce<T>(list: List<T>,
fn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T,
init: T) {
static reduce<T, E>(list: List<T>,
fn: (accumValue: E, currentValue: T, currentIndex: number, array: T[]) => E,
init: E) {
return list.reduce(fn, init);
}
static filter(array, pred: Function) { return array.filter(pred); }