This chapter covers:
- Debugging the TypeScript code with the help of source maps
- The role of linters
- Compiling and bundling TypeScript apps with Webpack
- Compiling TypeScript apps with Babel
- How to compile TypeScript with Babel and bundle with Webpack
TypeScript is one of the most loved languages. Yes, people love its syntax. But probably the main reason why it’s being loved is tooling. TypeScript developers appreciate auto-completion, these squiggly lines indicating errors as you type, and refactoring offered by IDEs. And the best part is that most of these features are implemented by the TypeScript team and not by the IDE developers.
You’ll see the same auto-complete and error messages in the online TypeScript Playground, in Visual Studio Code, or in WebStorm. When you install TypeScript, its bin directory includes two files: tsc and tsserver. The latter is the TypeScript Language Service that IDEs use to support these productivity features. When you type the TypeScript code, the IDEs communicate with tsserver that compiles the code in memory.
With the help of sourcemap files, you can debug the TypeScript code right in the browser. Linters allow you enforce the coding styles in your organization.