-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: DifficultGood luck.Good luck.Help WantedYou can do thisYou can do this
Milestone
Description
Bug Report
π Search Terms
circularly references itself jsdoc ts2456
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about
circular
β― Playground Link
Playground link (js)
Playground link (ts)
π» Code
Foo.js
/** @typedef {Object.<string, Foo>} Foo */Foo.ts
type Foo = {
[x: string]: Foo;
};π Actual behavior
Type alias 'Foo' circularly references itself. ts(2456) happens in Foo.js. The TypeScript equivalent works fine.
π Expected behavior
Both Foo.ts and Foo.js work without errors.
Related issues
I found some related issues but they are either closed or use a different example.
#39372 - Closed (fixed)
#45641 - Seems very similar but uses Array<> and typescript rather than jsdoc. I'm not sure if the root cause is the same so this might be a duplicate.
junaga, matthieusieben, cedx, Offroaders123, kungfooman and 4 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: DifficultGood luck.Good luck.Help WantedYou can do thisYou can do this