New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Later export causes `'T' is referenced directly or indirectly in its own type annotation` #27110

Open
andy-ms opened this Issue Sep 14, 2018 · 0 comments

Comments

Projects
None yet
4 participants
@andy-ms
Copy link
Member

andy-ms commented Sep 14, 2018

TypeScript Version: 3.1.0-dev.20180914

Code

/** @typedef {{}} T */

/** @type {T} */
const T = JSON.parse("");

export class C extends T {}

Expected behavior:

Same error as if the class isn't exported: Type '{}' is not a constructor function type. at the extends clause.

Actual behavior:

src/a.js:4:7 - error TS2502: 'T' is referenced directly or indirectly in its own type annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment