https://github.com/samchon/report-comment-compile-error
Special error from comments by TypeScript or Ts-Node
https://github.com/samchon/report-comment-compile-error
Last synced: 10 months ago
JSON representation
Special error from comments by TypeScript or Ts-Node
- Host: GitHub
- URL: https://github.com/samchon/report-comment-compile-error
- Owner: samchon
- License: mit
- Created: 2023-02-22T17:52:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T18:07:34.000Z (over 3 years ago)
- Last Synced: 2025-07-21T21:24:20.370Z (11 months ago)
- Language: TypeScript
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Error Report

```bash
npm install
npm run build
npm run test
```
Run above commands, then you may meet amazing bug.
TypeScript tries to compile `@link` tagged comments, and occurs error.
The error occured 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`.
```typescript
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 {
export namespace Comment {
// IMPORT STATEMENT OCCURS THE BUG
export import IStore = IBbsComment.IStore;
}
}
```