TypeScript/tests/cases/conformance/salsa/exportNestedNamespaces2.ts
Nathan Shively-Sanders c31808922d Remove assert for undeclared js-nested-exports
Previously, this would assert:

```ts
exports.undeclared.n = 1;
```

Because undeclared was never declared in any recognised way. Now it no
longer asserts, but does not bind. That's because the full pattern
starts with the line `exports = require('./x')` and assumes that x.js
declares `undeclared`. I am not sure how to bind this. The new test
contains this pattern in case I figure it out.
2018-02-27 15:04:10 -08:00

24 lines
445 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: mod.js
// Based on a pattern from adonis
exports.formatters = {}
// @Filename: first.js
exports = require('./mod')
exports.formatters.j = function (v) {
return v
}
// @Filename: second.js
exports = require('./mod')
exports.formatters.o = function (v) {
return v
}
// @Filename: use.js
import * as debug from './mod'
debug.formatters.j
var one = debug.formatters.o(1)