I am working on a node.js / express project in which I am using typescript. I have no problem importing things, but I have to use the following format, which is ugly / not scalable
import MyModule = require("../../ModuleFolder/MyModule");
Assuming my module looks like this
export module MyModule
{
export function doStuff():void
{
}
}
I cannot figure out how to pull out modules and classes without specifying a path. Ideally, I would like it to be like
import MyModule = require("MyModule");
Is there something I can do to make this possible or improve this implementation?
Update: I ended up using modules for this, which works very well.
ed209 source
share