Skip to content
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

Infer implementation signature based on overload signatures #14972

Closed
vilicvane opened this issue Apr 2, 2017 · 3 comments
Closed

Infer implementation signature based on overload signatures #14972

vilicvane opened this issue Apr 2, 2017 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@vilicvane
Copy link
Contributor

vilicvane commented Apr 2, 2017

Probably a duplicate, but I cannot find one.

function foo(p1: string): void;
function foo(p1: number, p2: boolean): void;
function foo(p1, p2) {
    // p1: string | number;
    // p2: boolean | undefined;
}

If there could be constraints among parameters via type guards, it would be awesome.

@aluanhaddad
Copy link
Contributor

See also #10570, #6118

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Apr 3, 2017
@RyanCavanaugh
Copy link
Member

#7763

Just literally search for the title?
image

@vilicvane
Copy link
Contributor Author

@RyanCavanaugh huh, I tried many combinations but not the title... Thanks for doing that for me, closing.

@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
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants