Skip to content

Generalize methods returning Node type #14863

Closed
@falsandtru

Description

@falsandtru

All methods returning the node type value should return their actual type, like #283(cloneNode) and #12048(appendChild).

TypeScript Version: master

Expected behavior:

e.g.

    insertBefore<T extends Node>(newChild: T, refChild: Node | null): T;

Actual behavior:

    insertBefore(newChild: Node, refChild: Node | null): Node;

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 issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions