TypeScript/tests/cases/compiler/commonJsImportClassExpression.ts
Nathan Shively-Sanders 905f9a02ad
module.exports = Entity is an alias, just like export = Entity (#23570)
* Make `module.export =` an alias like `export=` is

This breaks a couple of tests for previous workarounds. Fix in upcoming
commits.

* Basically fixes all the breaks, but needs cleanup

* More notes to myself

* Clean up TODOs

* Call mergeSymbolTable and delete export= afterward

instead of basically copying the code myself.

* More cleanup

* Remove unnecessary check in import type checking

* Revert to DIY code.

It is more correct and will go away in a few days.

* Exported class expressions can be used as type

In both JS and TS

* Do not require named class expressions
2018-04-23 15:24:31 -07:00

10 lines
141 B
TypeScript

// @Filename: mod1.ts
export = class {
chunk = 1
}
// @Filename: use.ts
import Chunk = require('./mod1')
declare var c: Chunk;
c.chunk;