TypeScript · Junior · Question 35 of 75
What does tsc compile a TypeScript file into?
- ✓Correct answer: JavaScript without type annotations (and optionally
.d.tsand source maps) - 2Machine code for the chosen platform, like the Go compiler
- 3A WebAssembly module loaded by the browser
Explanation
The compiler checks types and outputs JS for the specified target. In modern projects, building is often done by esbuild, SWC or Babel (which only strip types), and tsc --noEmit is run separately for checking.