i removed coffie-script from gemfile
routes.rb
Rails.application.routes.draw do
root 'welcome#index'
end
views/welcome/index.html.erb
assets/javascripts/welcome.ts
import {Greeter} from "./greeter";
window.onload = function () {
let greeter = new Greeter();
greeter.setName("what's this");
document.getElementById("p1").innerHTML = greeter.greet();
};
greeter.ts in assets/javascripts/
class Greeter {
private _greeting :string;
setName(name :string){
this._greeting = name;
}
greet() {
return this._greeting;
}
}
export { Greeter }
i added this to application.rb to support multi ts files compiling
Typescript::Rails::Compiler.default_options = %w(--target ES5 --noImplicitAny --module commonjs)
when i run rails in dev mode, here are the error snapshot

but if a copy copy class code from greeter.ts to welcome.ts, it runs ok
is this a bug? if not, how can i do?
thank you very much!
i removed coffie-script from gemfile
routes.rb
views/welcome/index.html.erb
assets/javascripts/welcome.ts
greeter.ts in assets/javascripts/
i added this to application.rb to support multi ts files compiling
when i run rails in dev mode, here are the error snapshot

but if a copy copy class code from greeter.ts to welcome.ts, it runs ok
is this a bug? if not, how can i do?
thank you very much!