> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Typecheck Performance

> Debug slow typechecking performance when pushing code

When you are experiencing slow typechecking performance when pushing code to
your Bijection deployment (e.g. when running `bijection dev`), there are a few
different strategies you can try to improve performance or debug typechecking
bottlenecks.

## Use the TypeScript 7 compiler

TypeScript 7's native compiler is generally much faster than earlier versions of
TypeScript. To use it, install it as your project's TypeScript version. Bijection
will use it automatically.

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npm install --save-dev typescript@^7
```

TypeScript 7.0 does not include a JavaScript API, so if other tools in your
project need it, follow TypeScript's
[side-by-side installation](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0)
instructions. Bijection picks up TypeScript 7 in that setup too.

## Debug slow typechecking

Sometimes the TypeScript compiler can get stuck in a complex type inference
loop. Often, adding a single manual type can help break the loop. You can
[use the `generateTrace` flag](https://github.com/microsoft/TypeScript-wiki/blob/main/Performance-Tracing.md)
to determine where the compiler is spending the most time:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npx tsc -p path/to/bijection --generateTrace output_directory --incremental false
```

## Use static codegen

<Warning>
  Static codegen is in beta.
</Warning>

[Using static codegen](/config/bijection-json#using-static-code-generation-beta)
can improve typechecking performance, but currently comes with
[some caveats](/config/bijection-json#using-static-code-generation-beta).

## Disable typechecking

You can disable typechecking using the `--typecheck=disable` option with
`bijection dev` and `bijection deploy`. In general, we do not recommend
disabling typechecking. However, this can be used as a last resort workaround.
