Skip to content

Support @typedef as member of namespace #25579

Open
@ghost

Description

TypeScript Version: 3.0.0-dev.20180711

Code

class C {
    /** @typedef {number} N */

    /** @type {N} */
    x = 0; // works
}

/**
 * @memberof C
 * @typedef {number} M
 */

/** @type {C.N} */
const x = 0; // broke

/** @type {C.M} */
const y = 0; // broke

Expected behavior:

No error.

Actual behavior:

C.N and C.M don't exist.

Metadata

Assignees

No one assigned

    Labels

    Domain: JSDocRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScriptcheckJsRelates to checking JavaScript using TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions