I have a hard time figuring out how to solve the following issue because I don't know what to search for. Let me explain: I've written a class using TypeScript that I'm exporting:
class MyAPIClass {
myMethod(one:number) : void;
secondMethod(text:string) : number;
}
export = MyAPIClass;
Now I'm using that class in another TypeScript project of mine:
import MyAPIClass = require('../path/MyAPIClass');
let myClass = new MyAPIClass();
myClass.myMethod(1);
This is working fine, but I don't get the "typings". My editor doesn't recognize the types from the other file. I also can't do this:
let myClass : MyAPIClass = new MyAPIClass();
How can I "import" the typings too?