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

lib.d.ts: Incorrect MessageEvent constructor signature. #4295

Closed
jduc88 opened this issue Aug 13, 2015 · 4 comments
Closed

lib.d.ts: Incorrect MessageEvent constructor signature. #4295

jduc88 opened this issue Aug 13, 2015 · 4 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

Comments

@jduc88
Copy link

jduc88 commented Aug 13, 2015

Description:

MessageEvent constructor signature should be same as base Event class ie.

new(type: string, eventInitDict?: EventInit): MessageEvent;

instead of,

new()

Documentation:

http://www.javascripture.com/MessageEvent

Error message on chrome:

TypeError: Failed to construct 'MessageEvent': An event name must be provided.

@danquirk danquirk added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Aug 13, 2015
@martinduparc
Copy link

This is a problem for progressevent too. Looking at #2314 @mhegazy talks about how some definitions are auto generated from the IE references. Looking at https://msdn.microsoft.com/en-us/library/windows/apps/hh466083.aspx, the progressevent seems fine so I am not sure what to do.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 21, 2015

@zhengbli can you take a look.

@zhengbli
Copy link
Contributor

Confirmed on Chrome and Firefox that both MessageEvent and ProgressEvent has a required parameter and an optional EventInit dictionary. IE and Edge both don't support the constructor, with or without parameters. I think we do need to change the signatures.

@mhegazy mhegazy added this to the TypeScript 1.6 milestone Aug 21, 2015
@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Aug 26, 2015
@zhengbli
Copy link
Contributor

Fixed by #4469

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 26, 2015
@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
Projects
None yet
Development

No branches or pull requests

5 participants