TypeScript/tests/cases/conformance/salsa/exportNestedNamespaces.ts
Nathan Shively-Sanders c3143d2e47 Support js nested namespace decls on exports
and module.exports.
2018-02-27 10:20:16 -08:00

32 lines
423 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: mod.js
exports.n = {};
exports.n.K = function () {
this.x = 10;
}
exports.Classic = class {
constructor() {
this.p = 1
}
}
// @Filename: use.js
import * as s from './mod'
var k = new s.n.K()
k.x
var classic = new s.Classic()
/** @param {s.n.K} c
@param {s.Classic} classic */
function f(c, classic) {
c.x
classic.p
}