* Alias for `module.exports.x = x` This fixes #40155 in a surprisingly small amount of code. * Treat any aliasable expression as an alias * test internal references to exported class
22 lines
316 B
TypeScript
22 lines
316 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @strict: true
|
|
// @outDir: out
|
|
// @declaration: true
|
|
|
|
// @filename: main.js
|
|
const { K } = require("./mod1");
|
|
/** @param {K} k */
|
|
function f(k) {
|
|
k.values()
|
|
}
|
|
|
|
// @filename: mod1.js
|
|
var NS = {}
|
|
NS.K =class {
|
|
values() {
|
|
return new NS.K()
|
|
}
|
|
}
|
|
exports.K = NS.K;
|