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

HTML File constructor does not declare the required parameters #3999

Closed
corruptmem opened this issue Jul 23, 2015 · 0 comments
Closed

HTML File constructor does not declare the required parameters #3999

corruptmem opened this issue Jul 23, 2015 · 0 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

@corruptmem
Copy link

The HTML5 File API specifies that the File constructor has two required parameters and one optional parameter: http://www.w3.org/TR/FileAPI/#file-constructor-params

However the dom.generated.d.ts file specifies that the File constructor has no parameters:
https://github.com/Microsoft/TypeScript/blob/84a6ee1fb9b6f820840bac227c039ef6d1d830b9/src/lib/dom.generated.d.ts#L3033

This leads to the following error: TS2346: Supplied parameters do not match any signature of call target.

It also appears to be impossible to extend that declaration as it is inside a var rather than an interface. As per #182 this appears to have been fixed for the lib.d.ts typings by moving all the declarations into an interface, but the DOM typings haven't been changed to follow this pattern, so I can't extend them.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Jul 23, 2015
@mhegazy mhegazy removed the Help Wanted You can do this label Jul 24, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Jul 24, 2015
@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Aug 14, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 19, 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

4 participants