Skip to content

Generalize methods returning Node type #14863

New issue

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

Closed
falsandtru opened this issue Mar 26, 2017 · 2 comments
Closed

Generalize methods returning Node type #14863

falsandtru opened this issue Mar 26, 2017 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@falsandtru
Copy link
Contributor

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;
@mhegazy mhegazy closed this as completed Mar 29, 2017
@mhegazy mhegazy added Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Bug A bug in TypeScript Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Mar 29, 2017
@mhegazy mhegazy self-assigned this Mar 29, 2017
@mhegazy mhegazy added this to the TypeScript 2.3 milestone Mar 29, 2017
@mhegazy mhegazy reopened this Mar 29, 2017
@RyanCavanaugh
Copy link
Member

@mhegazy ...aren't you busy? 😨

@mhegazy
Copy link
Contributor

mhegazy commented Mar 29, 2017

Just sitting there doing nothing; the wife is doing most of the work :D

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 13, 2017
@mhegazy mhegazy added Fixed A PR has been merged for this issue and removed Fixed A PR has been merged for this issue Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Aug 24, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants