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
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
=== tests/cases/conformance/jsdoc/declarations/source.js ===
|
|
module.exports = MyClass;
|
|
>module.exports = MyClass : typeof MyClass
|
|
>module.exports : typeof MyClass
|
|
>module : { exports: typeof MyClass; }
|
|
>exports : typeof MyClass
|
|
>MyClass : typeof MyClass
|
|
|
|
function MyClass() {}
|
|
>MyClass : typeof MyClass
|
|
|
|
MyClass.staticMethod = function() {}
|
|
>MyClass.staticMethod = function() {} : () => void
|
|
>MyClass.staticMethod : () => void
|
|
>MyClass : typeof MyClass
|
|
>staticMethod : () => void
|
|
>function() {} : () => void
|
|
|
|
MyClass.prototype.method = function() {}
|
|
>MyClass.prototype.method = function() {} : () => void
|
|
>MyClass.prototype.method : any
|
|
>MyClass.prototype : any
|
|
>MyClass : typeof MyClass
|
|
>prototype : any
|
|
>method : any
|
|
>function() {} : () => void
|
|
|
|
MyClass.staticProperty = 123;
|
|
>MyClass.staticProperty = 123 : 123
|
|
>MyClass.staticProperty : number
|
|
>MyClass : typeof MyClass
|
|
>staticProperty : number
|
|
>123 : 123
|
|
|
|
/**
|
|
* Callback to be invoked when test execution is complete.
|
|
*
|
|
* @callback DoneCB
|
|
* @param {number} failures - Number of failures that occurred.
|
|
*/
|