# 2.6 TSC/SWC

Google's V8 engine is exclusively designed to run JavaScript code and does not support TypeScript, a superset of JavaScript that includes additional type information. To address this, TypeScript code must be translated into JavaScript through a transformation process, enabling the V8 engine to execute it.&#x20;

Deno, however, utilizes a combination of tools - the TypeScript Compiler (TSC) and the Super-fast Web Compiler (SWC) - to handle both TypeScript and JavaScript files. When type-checking is required, Deno employs Microsoft's TSC compiler, which converts TypeScript to JavaScript and performs type error checking. Otherwise, Deno leverages the high-performance SWC compiler for rapid transpilation. This preference is due to TSC's slower performance, being implemented in JavaScript, compared to SWC's speed and efficiency.&#x20;

SWC, built with Rust, is a fast TypeScript/JavaScript compiler that takes in modern files featuring async-await and generates browser-compatible JavaScript code. This transformation ensures code compatibility across various browsers with different levels of support for newer language features. Deno utilizes SWC to convert TypeScript files to JavaScript seamlessly. With its compatibility with the latest ECMAScript specifications, Deno eliminates the need to convert JavaScript files for compatibility reasons. By default, SWC selectively processes TypeScript files, leaving JavaScript files untouched unless explicitly requested to modify them.&#x20;

For further information on SWC, visit their official website at <https://swc.rs/>, which provides detailed insights into the compiler's features, functionality, and optimal usage.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://choubey.gitbook.io/internals-of-deno/architecture/tsc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
