I have read:
but I still don't get how it works and what it is good for. Could someone please explain what it is and when I would want to use it?
From Clay Allsopp on Medium:
allowJs is the option newly available in 1.8. The TypeScript compiler will run a quick sanity check on .js files for syntax errors but otherwise passes them straight through to the output directory.
This is useful when migrating a JavaScript project to TypeScript, that way you don't have to migrate everything at once but instead start writing new code in TypeScript and/or migrate each file one by one. You can find more information about migration from JavaScript to Typescript on the official site for TypeScript that has a tutorial called "Migrating from JavaScript".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With