What's the best way to include typescript class definition in node.js file?
Let's say I have this code:
class Car{
public Color;
constructor(aColor:string){
this.Color = aColor;
}
}
I want to be able to make an instance of a Car this way:
var MyCar = new Car("green");
I know that require() will return an object, but I dont need an object I only need to know the definition of a Car.
What's the best way to do this?
module.exports = MyModuleI guess?