TypeScript/tests/cases/conformance/jsdoc/declarations/jsDeclarationsExportAssignedConstructorFunctionWithSub.ts
Nathan Shively-Sanders 0cf100dcf8
Add constructor functions to aliasable expressions (#36108)
* Add constructor functions to aliasable expressions

Fixes #35228, at least the crash. There are still a couple of errors
that are probably incorrect.

Note that isJSConstructor relies on parent pointers and the ability to
merge symbols, so I had to move isAliasSymbolDeclaration (back?) to the
checker.

* add simple test case

* remove errors in test

* fix bad merge
2020-01-29 09:36:59 -08:00

17 lines
379 B
TypeScript

// @allowJs: true
// @checkJs: true
// @target: es5
// @outDir: ./out
// @declaration: true
// @filename: jsDeclarationsExportAssignedConstructorFunctionWithSub.js
/**
* @param {number} p
*/
module.exports = function (p) {
this.t = 12 + p;
}
module.exports.Sub = function() {
this.instance = new module.exports(10);
}
module.exports.Sub.prototype = { }