While working on multiple files, suddenly I got an error from meteor that relative .ts imports were failing.
Error: Cannot find module './Foo.ts'
I had seen no errors appear during the build of the app which made me question what happened. Also using METEOR_DEBUG_BUILD=1 showed no errors, and gave a success of the barbatus:typescript build step.
I used VCS to look at the created app.js file, and noticed that before the error the .ts files were compiled and after the error started showing the app.js file had no compiled .ts files anymore.
By trial and error I noticed I made a syntactic mistake (notice the ; in the constructor):
export default class Bar {
a: string;
b: string;
constructor(a: string, b :string;){
this.a = a;
this.b = b;
}
}
I guess this made barbatus:typescript fail and stop the compiling of .ts files. This is logical, but it was giving no feedback and even gave a success report, which made meteor happily build and then not be able to import .ts files.
I haven't diven into the barbatus:typescript package but I would suggest some kind of compile-error output.
Also want to take a moment to say that I think it's great that this package enables TypeScript for Meteor. Outside of this headache it has been a blast.