Skip to content

Update Node interface #24633

@falsandtru

Description

@falsandtru

TypeScript Version: 3.0.0-dev.201xxxxx

Search Terms:

Code

Expected behavior:

interface Node extends EventTarget {
    readonly childNodes: NodeListOf<Node & ChildNode>;
    readonly firstChild: Node & ChildNode | null;
    readonly lastChild: Node & ChildNode | null;
    readonly nextSibling: Node | null;
    readonly parentElement: Element | null;
    readonly parentNode: Node & ParentNode | null;

Actual behavior:

interface Node extends EventTarget {
    readonly childNodes: NodeListOf<Node & ChildNode>;
    readonly firstChild: Node | null;
    readonly lastChild: Node | null;
    readonly nextSibling: Node | null;
    readonly parentElement: HTMLElement | null;
    readonly parentNode: Node | null;

Playground Link:

Related Issues:
#4689

Metadata

Metadata

Assignees

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
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions