8000 [Suggestion] document.getElementById is not correctly typed in TypeScript · Issue #63 · uhyo/better-typescript-lib · GitHub
[go: up one dir, main page]

Skip to content
[Suggestion] document.getElementById is not correctly typed in TypeScript #63
Closed
@Judekeyser

Description

@Judekeyser

In TypeScript, getElementById returns a HTMLElement, while the standard mandates it to return a Element in order to account for more general situations like SVGElement and alike.

This change seems to be refused by TypeScript, for many years now:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0