Closed
Description
TypeScript Version: nightly (2.0.0-dev.20160705)
Code
target: es6 , module: commonjs , moduleResolution: node
(tried target=es5 moduleResolution=classic as well)
File A (index.ts):
import * as TestModule from './test.ts';
let obj = new TestModule.Test();
File B (test.ts):
export class Test {}
Expected behavior:
Emitted index.js file should have:
const TestModule = require('./test.js');
Actual behavior:
Emited index.js file wrongly points at .ts file causing runtime module not found error.
const TestModule = require('./test.ts')
I've searched internet and looked towards BC changes in TypeScript but couldn find anything on this topic. I am 100% sure it changed extensions from .ts to .js in the earlier versions of TypeScript (around 1.5 or so).