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

Comments

Projects
None yet
7 participants
@mryanmurphy
Copy link

mryanmurphy commented Sep 14, 2014

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

This comment has been minimized.

Copy link
Member

danquirk commented Sep 15, 2014

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

@jonathandturner jonathandturner added this to the TypeScript 2.0 milestone Sep 16, 2014

@mhegazy mhegazy added Suggestion and removed Bug labels Oct 9, 2014

@mhegazy mhegazy removed this from the TypeScript 2.0 milestone Oct 9, 2014

@jzelenka

This comment has been minimized.

Copy link

jzelenka commented Feb 26, 2015

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

This comment has been minimized.

Copy link
Contributor

mhegazy commented Feb 26, 2015

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

@dperelman

This comment has been minimized.

Copy link

dperelman commented Feb 28, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.