O'Reilly logo

TypeScript Blueprints by Ivo Gabe de Wolff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding TypeScript

Before you can convert JavaScript files to TypeScript, you must add the TypeScript compiler to a project. If the project already uses a build step, the TypeScript compiler must be integrated into the build step. Otherwise, a new build step must be created. In the following sections, we will set up TypeScript and the build system.

Configuring TypeScript

In all cases, you should start with configuring TypeScript. This configuration will be used by code editors and the build tool. The most important setting is allowJs. This setting allows JavaScript files in the TypeScript project. Other important options are target and module. For target, you can choose between es3, es5, and es2015. The latest version of JavaScript, es2015, is not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required