Skip to content

The return type of the index in DataTransferItemList (lib.d.ts) should be DataTransferItem and not File #6106

Closed
@mtestrot

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

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeWould introduce errors in existing codeBugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions