Skip to content

DragEvent should accept a DragEventInit inheriting from MouseEventInit #17885

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

Closed
WojciechP opened this issue Aug 18, 2017 · 3 comments
Closed
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@WojciechP
Copy link

TypeScript Version: master, eef7d8b

Code

let ev = new DragEvent('drag', {clientX: 40})

Expected behavior:
This should typecheck, because the second argument to new DragEvent should inherit from MouseEventInit: https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent

Actual behavior:
Typechecking fails, because the typings only allow dataTransfer property.

@kitsonk
Copy link
Contributor

kitsonk commented Aug 18, 2017

These typings are imported from files generated by Microsoft/TSJS-lib-generator. The contribution guidelines to that are documented here.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 21, 2017

As @kitsonk pointed out. PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

@mhegazy mhegazy added Help Wanted You can do this Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Aug 21, 2017
@mhegazy mhegazy added this to the Community milestone Aug 21, 2017
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@jakebailey
Copy link
Member

Just looking at old issues; this was fixed back in #25944.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

5 participants