build(typescript): Migrated change detection to typescript
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user