Skip to content

Autocompletion fails on union namespace function #18461

@saschanaz

Description

@saschanaz

TypeScript Version: 2.5.2

Code

let n: typeof Foo | typeof Bar;
n.name; // hover on `name` does not show its type
n.n // no autocompletion

namespace Foo {
    export function name() {
        return "foo";
    }
}

namespace Bar {
    export function name() {
        return "bar";
    }
}

Expected behavior: Autocompletion should work.

Actual behavior: It doesn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    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