Open reid-rigo opened 8 years ago
I'm using the typescript-rails gem and Rails 4.
Here's what I did to export a module.
//myMod.ts
module myMod {
export myFunction (){
}
export myClass (){
}
}
Then, in another file you can import using the following:
/// <reference path="./myMod.ts" />
You can call
myMod.myFunction();
inside any other file.
This gem doesn't appear to allow ES6 import/export syntax. Is there a way to do this with the asset pipeline?