Early Benefits
Even at this point you can get some great benefits from TypeScript understanding your project. If you open up an editor like VS Code or Visual Studio, you’ll see that you can often get some tooling support like completion. You can also catch certain bugs with options like:
-
noImplicitReturns
which prevents you from forgetting to return at the end of a function. -
noFallthroughCasesInSwitch
which is helpful if you never want to forget abreak
statement betweencase
s in aswitch
block.
TypeScript will also warn about unreachable code and labels, which you can disable with allowUnreachableCode
and allowUnusedLabels
respectively.
Please login to continue.