Skip to content

Go to definition: go to correct overload #10074

@ghost

Description

TypeScript Version: nightly

Code

interface I {
    f(x: number): number;
    g(): void;
    h(): void;
    i(): void;
    f(x: string): string;
}

const i: I = undefined;
const x: number = i.f(1);

Expected behavior:

Go-to-definition on i.f(1) goes to f(x: number).

Actual behavior:

Compiles correctly (using the f(x: number) overload), but go-to-definition goes to f(x: string).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions