aba932aefa
* Commonjs module:create synthetic exports symbol Previously, the `module` identifier in commonjs modules got a synthetic type with a single property `exports`. The exports property reused the file's symbol, which, for a module file, gives the correct exported properties. However, the name of this symbol was still the filename of the file, not `exports`. This PR creates a synthetic symbol for `exports` by copying in a similar way to esModuleInterop's `default` symbol in `resolveESModuleSymbol` (although the intent there is to strip off signatures from the symbol). * correct parent of synthetic symbol
26 lines
1,010 B
Plaintext
26 lines
1,010 B
Plaintext
=== tests/cases/conformance/jsdoc/declarations/index.js ===
|
|
module.exports = class Thing {
|
|
>module.exports = class Thing { /** * @param {number} p */ constructor(p) { this.t = 12 + p; }} : typeof import("tests/cases/conformance/jsdoc/declarations/index")
|
|
>module.exports : typeof import("tests/cases/conformance/jsdoc/declarations/index")
|
|
>module : { exports: typeof import("tests/cases/conformance/jsdoc/declarations/index"); }
|
|
>exports : typeof import("tests/cases/conformance/jsdoc/declarations/index")
|
|
>class Thing { /** * @param {number} p */ constructor(p) { this.t = 12 + p; }} : typeof import("tests/cases/conformance/jsdoc/declarations/index")
|
|
>Thing : typeof import("tests/cases/conformance/jsdoc/declarations/index")
|
|
|
|
/**
|
|
* @param {number} p
|
|
*/
|
|
constructor(p) {
|
|
>p : number
|
|
|
|
this.t = 12 + p;
|
|
>this.t = 12 + p : number
|
|
>this.t : any
|
|
>this : this
|
|
>t : any
|
|
>12 + p : number
|
|
>12 : 12
|
|
>p : number
|
|
}
|
|
}
|