Skip to content
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

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


Copy link

@andy-ms andy-ms commented Sep 14, 2018

TypeScript Version: 3.1.0-dev.20180914


/** @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
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants