-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
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).
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue