Awesome blog post :-).
One nitpick. allowJs
doesn’t simply do a pass through on .js
and .jsx
files. At the very least, the appropriate compatibility helpers will be injected depending on your tsconfig compiler options. For example, for (var c in "hello") { ... }
will get transformed if your target is ES5/ES3 and you’ve set downlevelIteration
to true, even if your code is inside of a JS file.
I’m compiling what I hope to be the most thorough documentation on tsconfig options, so I’ve been doing a lot of experimentation and research to understand each option completely: http://gist.github.com/earksiinni/832c444811a8fcc019008152727f5d00