Later export causes 'T' is referenced directly or indirectly in its own type annotation
#27110
Open
Description
opened on 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.
Activity