Loading topic
.js and .ts files can coexist during migration.2 min read.js files continue working while new or converted files use TypeScript.2 min readtsconfig.json that includes src. It also assumes you understand that TypeScript checks code before it runs, while Node.js runs JavaScript.2 min readnpm commands, and have already created a TypeScript project with tsconfig.json. The compiler is TypeScript's checker. It reads your code and reports places where the types do not agree.2 min read.ts.2 min readtsconfig.json, and you understand JavaScript functions, objects, and arrays. This chapter focuses on finding values whose types TypeScript cannot determine and replacing them with useful types.2 min readtsconfig.json, and JavaScript and TypeScript files may still coexist.2 min read.ts files. This chapter focuses on null, undefined, and the compiler checks that prevent missing values from causing runtime errors.2 min readJSON.parse, and that your project already compiles a mix of .js and .ts files. This chapter focuses on values whose shape is not known yet, such as data from a file, API, or JavaScript library.2 min readtsconfig.json. This chapter focuses on the final build step: turning the converted .ts file into JavaScript and running the emitted program.2 min readnpx tsc from its root directory. Strict mode is a group of compiler checks. It reports more possible mistakes at compile time, but it does not change how JavaScript runs.2 min readtsconfig.json, and a converted file that compiles locally. This chapter shows how to keep the migration safe after the first successful build.2 min read