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

MouseEvent constructor is missing parameters #674

Closed
mryanmurphy opened this issue Sep 14, 2014 · 4 comments
Closed

MouseEvent constructor is missing parameters #674

mryanmurphy opened this issue Sep 14, 2014 · 4 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 Revisit An issue worth coming back to

Comments

@mryanmurphy
Copy link

MouseEvent constructor is defined incorrectly in lib.d.ts. The constructor should take two parameters: a string for event type and a parameters object.

@danquirk danquirk added Bug A bug in TypeScript Revisit An issue worth coming back to labels Sep 15, 2014
@danquirk
Copy link
Member

Adding to the bucket of lib.d.ts fixes me need to make

@sophiajt sophiajt added this to the TypeScript 2.0 milestone Sep 16, 2014
@mhegazy mhegazy added Suggestion An idea for TypeScript and removed Bug A bug in TypeScript labels Oct 9, 2014
@mhegazy mhegazy removed this from the TypeScript 2.0 milestone Oct 9, 2014
@mhegazy mhegazy added the Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript label Dec 2, 2014
@jzelenka
Copy link

Is there any way around this except patching lib.d.ts like this:

declare var MouseEvent: {
prototype: MouseEvent;
new(): MouseEvent;
new(type: string, options: any): MouseEvent;
}

@mhegazy
Copy link
Contributor

mhegazy commented Feb 26, 2015

This is the only way i can think of as well.

@dperelman
Copy link

It's not a great solution, but another workaround is that the current TypeScript will let you use the deprecated method initMouseEvent().

@mhegazy mhegazy added Bug A bug in TypeScript and removed Suggestion An idea for TypeScript labels Mar 24, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Mar 25, 2015
@mhegazy mhegazy assigned zhengbli and unassigned mhegazy Apr 7, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 17, 2015
@mhegazy mhegazy closed this as completed Apr 17, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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 Revisit An issue worth coming back to
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants