Skip to content

Commit 80e6345

Browse files
author
farfromrefug
committed
chore: fix typings
1 parent 8a66e9e commit 80e6345

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/collectionview/index.d.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,33 @@ export class CollectionView extends CollectionViewBase {
1414
public refresh();
1515
public refreshVisibleItems();
1616
public isItemAtIndexVisible(index: number): boolean;
17-
public scrollToIndex(index: number, animated: boolean, snap?: SnapPosition = SnapPosition.START);
17+
public scrollToIndex(index: number, animated?: boolean, snap?: SnapPosition = SnapPosition.START);
1818
public scrollToOffset(value: number, animation?: boolean);
1919
public getViewForItemAtIndex(index: number): View;
2020
// on iOS a view is dragged from its center by default
2121
// if you use a drag "handle" just pass the touch event main pointer
2222
// to delta the dragging to be good
2323
startDragging(index: number, pointer?: Pointer);
2424
async eachChildAsync(callback);
25+
26+
on(event: CollectionViewBase.itemLoadingEvent, callback: (args: CollectionViewItemEventData) => void, thisArg?: any);
27+
on(event: CollectionViewBase.displayItemEvent, callback: (args: CollectionViewItemDisplayEventData) => void, thisArg?: any);
28+
2529
}
2630

2731
export interface CollectionViewItemEventData extends EventData {
2832
eventName: string;
29-
object: CollectionView;
30-
index: number;
31-
view: View;
32-
item: any;
33+
object: any;
34+
index?: number;
35+
view?: View;
36+
item?: any;
3337
bindingContext?: any;
3438
}
3539

3640
export interface CollectionViewItemDisplayEventData extends EventData {
3741
eventName: string;
38-
object: CollectionView;
39-
index: number;
42+
object: any;
43+
index?: number;
4044
}
4145

4246
/**

0 commit comments

Comments
 (0)