Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mtestrot opened this issue Dec 15, 2015 · 2 comments
Labels
Breaking Change Would introduce errors in existing code Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@mtestrot
Copy link

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

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Dec 15, 2015
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 1.8 milestone Dec 15, 2015
@zhengbli zhengbli added the Help Wanted You can do this label Dec 21, 2015
@zhengbli
Copy link
Contributor

@mtestrot You are welcomed to contribute to the lib.d.ts bugs :) ! The instruction is at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes

@zhengbli zhengbli added the Good First Issue Well scoped, documented and has the green light label Dec 21, 2015
@mhegazy mhegazy modified the milestones: Community, TypeScript 1.8 Jan 5, 2016
@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Jan 12, 2016
@mhegazy mhegazy modified the milestones: TypeScript 1.8, Community Jan 13, 2016
@mhegazy mhegazy added Fixed A PR has been merged for this issue Fixed in TSJS repo and removed Fixed in TSJS repo Fixed A PR has been merged for this issue labels Jan 13, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 13, 2016

removed Fixed in TSLS repo by mistake.

@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo labels Jan 20, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Would introduce errors in existing code Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants