[Suggestion] document.getElementById is not correctly typed in TypeScript #63
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
In TypeScript,
getElementById
returns aHTMLElement
, while the standard mandates it to return aElement
in order to account for more general situations likeSVGElement
and alike.This change seems to be refused by TypeScript, for many years now:
Node.parentElement
should beElement | null
, notHTMLElement | null
microsoft/TypeScript-DOM-lib-generator#1151 (comment)The text was updated successfully, but these errors were encountered: