Skip to content

ElementTraversal: missing some nulls #12526

Closed
@tkrotoff

Description

@tkrotoff

Inside dom.generated.d.ts:

interface ElementTraversal {
    readonly childElementCount: number;
    readonly firstElementChild: Element;
    readonly lastElementChild: Element;
    readonly nextElementSibling: Element;
    readonly previousElementSibling: Element;
}

should be:

interface ElementTraversal {
    readonly childElementCount: number;
    readonly firstElementChild: Element | null;
    readonly lastElementChild: Element | null;
    readonly nextElementSibling: Element | null;
    readonly previousElementSibling: Element | null;
}

Example: https://jsfiddle.net/tkrotoff/khzbrkpg/

(tested with [email protected] lib.dom.d.ts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions