Fix TypeScript 2.4 errors, introduced mainly due weak types and covariant checking for callbacks (#4476)

This commit is contained in:
Panayot Cankov
2017-07-03 11:57:00 +03:00
committed by Alexander Vakrilov
parent 9e6498c29a
commit 8adb2fdfef
20 changed files with 92 additions and 23 deletions

View File

@ -1,4 +1,4 @@
import { Observable } from "../observable";
import { Observable, EventData } from "../observable";
import * as virtualArrayDef from ".";
const CHANGE = "change";
@ -158,3 +158,8 @@ export class VirtualArray<T> extends Observable implements virtualArrayDef.Virtu
}
}
}
export interface VirtualArray<T> {
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
on(event: "itemsLoading", callback: (args: virtualArrayDef.ItemsLoading) => void, thisArg?: any);
on(event: "change", callback: (args: virtualArrayDef.ChangedData<T>) => void, thisArg?: any);
}