Quiz · A TypeScript project · lesson 6 of 10Quiz — compilationHow do you compile TypeScript into JavaScript?[A]You rename each .ts file to .js: the syntax is the same, and browsers skip the annotations as if they were comments. tsc is an optional checker you may never run, and tsconfig.json only stores the formatting rules for the project's code.[B]Browsers run .ts files themselves, so no compile step is needed: the types stay in the file, and the browser checks every one of them while the program runs. tsconfig.json only sets up the hints that the code editor shows as you type.[C]The compiler tsc turns .ts files into .js. Its settings live in tsconfig.json, where compilerOptions set target, module, outDir and strict. tsc reports type errors before the run and writes JavaScript with every type erased.[D]tsc copies every annotation into the .js file so that the types are checked at run time too, on every call. tsconfig.json mainly lists the npm packages to install, and target picks the one browser that the code must support.← Backtsconfig.jsonNext →.d.ts files and @types