# Built-in TypeScript

Deno executes `.ts` and `.tsx` files directly, and its binary includes a type checker. You do not need `typescript`, `ts-node`, or `tsx` just to start a project.

```bash
deno run main.ts       # execute
deno check main.ts     # static type check
deno test --check      # test and check the test module graph
```

<Callout type="warn" title="Runnable is not type-correct">
Run `deno check` explicitly in the current workflow. Do not treat a successful `deno run` as full type validation or wait for production startup to reveal errors.
</Callout>

## Configuration rule

Deno-first projects usually keep a small set of TypeScript options in `deno.json`:

```json
{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true
  }
}
```

An existing Node project's `tsconfig.json` can still be read. When `deno.json` also contains `compilerOptions`, it takes precedence. Emit settings do not apply because Deno does not use the checker to write JavaScript output.

## Web, worker, and DOM types

The default type environment targets the Deno runtime and does not include browser `document`. Configure `lib` explicitly for shared browser code instead of hiding environment differences with global declarations.

Official references: [TypeScript support](https://docs.deno.com/runtime/fundamentals/typescript/) and [Configuring TypeScript](https://docs.deno.com/runtime/reference/ts_config_migration/).
