Skip to content

@typedef creates namespace in typescript code #16359

Closed
@ghost

Description

TypeScript Version: nightly (2.4.0-dev.20170608)

Code

namespace N {
    export namespace M {
        export function f(_x: N.M.T): void {}
        export type T = string;
    }

    /** @typedef {string} N.Str */
    export type Str = string;
}

Expected behavior:

No error.

Actual behavior:

src/a.ts(3,31): error TS4078: Parameter '_x' of exported function has or is using private name 'N'.
src/a.ts(3,33): error TS2694: Namespace 'N' has no exported member 'M'.

(Broken by #15856)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in 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