mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
Fix TypeScript 2.4 errors, introduced mainly due weak types and covariant checking for callbacks (#4476)
This commit is contained in:

committed by
Alexander Vakrilov

parent
9e6498c29a
commit
8adb2fdfef
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user