* Fix resolution of exported types in commonjs It is fine to resolve the types of exported classes in ES6: ```js export class C { } var c = new C() ``` But not for commonjs exported classes: ```js module.exports.C = class { } var c = new C() // should error ``` Fixes #24492 * All jsdoc type aliases are available locally in commonjs modules * Check that location isSourceFile before commonJsModuleIndicator
6 lines
116 B
TypeScript
6 lines
116 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @Filename: bug24492.js
|
|
module.exports.D = class { }
|
|
new D()
|