When I try to import a local file it either throws an error at runtime but compiling it using tsc works. When I make it work for node.js, typescript throws an error at compile time.
When I do
import A = require("./A");
node.js complains, that it can not find the A module and typescript compiles just fine.
But when I change it to
import A = require("./js/A");
node.js can find the module but Typescript tells me there is an error.
The layout is like this:
js
\- A.ts
\- B.ts
I compile the files separately and I already tried searching for changing the root directory for the typescript compiler but I couldn't find anything.