The return type of the index in DataTransferItemList (lib.d.ts) should be DataTransferItem and not File #6106
Closed
Description
current Definition:
interface DataTransferItemList {
length: number;
add(data: File): DataTransferItem;
clear(): void;
item(index: number): File;
remove(index: number): void;
[index: number]: File;
}
should be:
interface DataTransferItemList {
length: number;
add(data: File): DataTransferItem;
clear(): void;
item(index: number): DataTransferItem; // changed
remove(index: number): void;
[index: number]: DataTransferItem; // changed
}
cf. Spec at https://html.spec.whatwg.org/multipage/interaction.html#datatransferitemlist