Closed as not planned
Labels
BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".VS Code TrackedThere is a VS Code equivalent to this issueWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it
Milestone
Description
From Clément P (@yukulele) on October 5, 2017 12:7
- VSCode Version: 1.16.1
- OS Version: macOS Sierra 10.12.6
Steps to Reproduce:
- Create this code in typescript file
const elm = document.createElement('main')elmis typed asHTMLElementinstead ofHTMLMainElement
lib.dom.d.ts is not up to date
how to update it without wait for vscode update ?
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#35620
Reacted by Clément P
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".VS Code TrackedThere is a VS Code equivalent to this issueWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it
Activity
mhegazy commentedon Oct 9, 2017
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.
jamOne- commentedon Oct 10, 2017
Can I fix this one as my first contribution to TypeScript?
SimonSchick commentedon Oct 11, 2017
Dominik Rabij (@jamOne-) just make a PR https://github.com/Microsoft/TSJS-lib-generator
jamOne- commentedon Oct 11, 2017
I already know it, but I don't think this change is that simple.
As far as I understand this generator code, to generate interface
HTMLElementTagNameMapindom.generated.d.tsonlybrowser.webidl.xmlinterfaces are used, butHTMLMainElementis inaddedTypes.jsonfile so I have to change the generator code, or am I wrong?SimonSchick commentedon Oct 11, 2017
Pretty sure you can just add overload to
addedTypes.json.jamOne- commentedon Oct 11, 2017
I am not sure I understand you. Does generating interface
HTMLElementTagNameMaptake into accountaddedTypes.json?inad9300 commentedon Oct 15, 2017
Please, have a look at the on-going progress before proceeding: #17828
yukulele commentedon Dec 15, 2022
The following elements are affected:
abbraddressarticleasidebbdibdocitecodedddfndtemfigcaptionfigurefooterheaderhgroupikbdmainmarknavnoscriptrprtrubyssampsectionsmallstrongsubsummarysupuvarwbrRyanCavanaugh commentedon Aug 31, 2026
HTMLMainElementdoesn't even exist. I don't think there's anything useful to be done here by pretending that there are nominal types for these elements that don't actually do anything;HTMLELementandHTMLMainElementare identical as far as TS is concerned, and it's less misleading to return the former.