Skip to content

HTMLElement.setAttribute's parameters are marked optional; they are not #4407

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
LPGhatguy opened this issue Aug 21, 2015 · 2 comments · Fixed by microsoft/TypeScript-DOM-lib-generator#29
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 Help Wanted You can do this

Comments

@LPGhatguy
Copy link
Contributor

lib.d.ts defines HTML.setAttribute with a signature of (name?: string, value?: string). Neither of the parameters are actually optional and will cause runtime errors on at least Chrome and Firefox.

@LPGhatguy LPGhatguy changed the title HTMLElement.setAttribute's parameters are marked optional; it is not HTMLElement.setAttribute's parameters are marked optional; they are not Aug 21, 2015
@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Aug 21, 2015
@mhegazy mhegazy added this to the TypeScript 1.7 milestone Aug 21, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.7, TypeScript 1.8 Oct 9, 2015
@mhegazy mhegazy added the Help Wanted You can do this label Dec 8, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Dec 8, 2015

PRs are welcomed. here is some documentation for adding new types to lib.d.ts: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes

@LPGhatguy
Copy link
Contributor Author

I've submitted a PR (as noted just above this) to the TSJS-lib-generator project.

@zhengbli zhengbli reopened this Dec 9, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.8, Community Dec 9, 2015
@zhengbli zhengbli added Fixed A PR has been merged for this issue and removed Fixed in TSJS repo labels Jan 7, 2016
@zhengbli zhengbli closed this as completed Jan 7, 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 Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants