We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Interface NodeList is correctly typed
NodeList
interface NodeList { item(index: number): Node | null; }
but interface NodeListOf is missing the null type:
NodeListOf
null
interface NodeListOf<TNode extends Node> extends NodeList { item(index: number): TNode; }
therefore TSC does not warn about missing null checks:
const node = document.childNodes.item(999999).firstChild;
The text was updated successfully, but these errors were encountered:
Agree 👍🏻 open to changes here
Changed my mind after thinking about it in #1268, this is probably too big of an ecosystem break
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Interface
NodeList
is correctly typedbut interface
NodeListOf
is missing thenull
type:therefore TSC does not warn about missing null checks:
The text was updated successfully, but these errors were encountered: