Skip to content

Incorrect declarations for clipboard events #7737

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
mindplay-dk opened this issue Mar 30, 2016 · 5 comments
Closed

Incorrect declarations for clipboard events #7737

mindplay-dk opened this issue Mar 30, 2016 · 5 comments
Labels
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

Comments

@mindplay-dk
Copy link

The DOM declaration files declare clipboard events as DragEvent - for example here:

addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;

I'm pretty sure these should have been declared with listener as ClipboardEvent - it's defined, but doesn't appear to be used in the actual event overloads?

This blocks me from accessing e.g. event.clipboardData...

@mhegazy mhegazy added 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 labels Mar 30, 2016
@mhegazy mhegazy added this to the Community milestone Mar 30, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Mar 30, 2016

PRs welcomed. more information about contributing lib fixes available in https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes

@DanielRosenwasser DanielRosenwasser added the Good First Issue Well scoped, documented and has the green light label Mar 30, 2016
@YuichiNukiyama
Copy link
Contributor

This already had been fixed in TSJS-Repo.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 30, 2016

indeed. thanks @YuichiNukiyama!

@mhegazy mhegazy added Fixed in TSJS repo and removed Help Wanted You can do this Good First Issue Well scoped, documented and has the green light labels Mar 30, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.0, Community Mar 30, 2016
@mindplay-dk
Copy link
Author

Soooo, wait for the next release or...?

Maybe time to think about making the DOM declaration files explicitly versionable/installable (e.g. via typings) since these seem to get more frequent updates than the Typescript package itself?

@DanielRosenwasser
Copy link
Member

@mindplay-dk perhaps, but that's for another issue - for now, you can fetch the current versions of our lib.d.ts manually or you can use nightly versions of TypeScript by running npm install -g typescript@next.

@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo labels Apr 27, 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
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
Projects
None yet
Development

No branches or pull requests

5 participants