TypeScript Version: 2.1.0-dev.20161101
Code
node_modules/foo/index.ts: (note the .ts)
app/index.ts:
import * as foo from "foo"; foo.x + 1;
app/tsconfig.json:
{
"compilerOptions": {
"outDir": "bin"
}
}
Expected behavior:
Writes to bin/index.js.
Actual behavior:
Writes to bin/app/index.js.
The problem is that getCommonSourceDirectory considers all files, not just the ones that will actually be emitted.