Skip to content

TypeScript tries to compile @link tagged comments and occurs error #52918

@samchon

Description

@samchon

Bug Report

⏯ Demonstration Link

Bug

💻 Code

import { IBbsArticleSnapshot } from "./IBbsArticleSnapshot";
import { IBbsComment } from "./IBbsComment";

/**
 * Article of BBS.
 * 
 * Note that, main content of article is stored in {@link snapshots} property.
 * The {@link IBbsArticleSnapshot} records would be accumulated whenever updating
 * current article. It is to keep the history of article.
 * 
 * In the same reason, {@link IBbsComment} also stores {@link IBbsCommentSnapshot} 
 * records whenever update it.
 * 
 * -------------------------------------------
 * 
 * Let's link that never exists
 * 
 *   - {@link NeverExistDto}
 *   - {@link Nothing}
 *   - {@link NoWhere}
 *   - {@link NoOne}
 * 
 * @author Samchon
 */
export interface IBbsArticle {
    ...
}
export namespace IBbsArticle {
    // THIS IMPORT STATEMENT OCCURS BUG
    export namespace Comment {
        export import IStore = IBbsComment.IStore;
    }
}

🙁 Actual behavior

I succeded to reproduce #49706 bug. The bug was not occured by Korean characters. The error was occured by type import statement in a namespace declaration that has same name with a interface type.

When there's an interface that declared namespace with same name, and imports another type in the namespace. Also, the error occurs only when importing TypeScript file (await import("file") statement) after composing ts.createProgram() with ts-node.

I can't sure that this is a bug of TypeScript or ts-node. Therefore, I report this issue both in TypeScript and ts-node.

🙂 Expected behavior

No error by @link tagged comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions