There is a specific typescript definition that I cannot currently get working:
mapping.ts
class Mapping {
//
}
var mapping = new Mapping();
export = mapping;
Which enables the use:
import _mapping = require('mapping');
_mapping.doSomething();
However I cannot quite get to the solution of how my mapping.d.ts should be structured to show this and cannot get it to compile.
mapping.d.ts
export var mapping: Mapping;
This fails since the usage would now be:
_mapping.mapping.doSomething();
Any suggestions would be appreciated besides updating the usage to include the object name.