Bun v1.4.3
To install Bun
curl
curl -fsSL https://bun.sh/install | bashnpm
npm install -g bunpowershell
powershell -c "irm bun.sh/install.ps1|iex"scoop
scoop install bunbrew
brew tap oven-sh/bunbrew install bundocker
docker pull oven/bundocker run --rm --init --ulimit memlock=-1:-1 oven/bunTo upgrade Bun
bun upgradebun check: a TypeScript type checker built into Bun#

bun check is an incredibly fast TypeScript type checker that passes 100% of TypeScript 7.0.2's conformance test suite.
bun check1 | import { greet } from "./user";
2 |
3 | const message = greet({ id: "1", name: "Ada" });
^
error: TS2322: Type 'string' is not assignable to type 'number'.
at src/index.ts:3:25
Found 1 error in 1 file, checked 2 files [14.00ms]It's 3x to 6.4x faster than tsc 7.0.2, on a 16-core Apple silicon Mac:
Project | Files |
|
| Faster |
|---|---|---|---|---|
VS Code | 9,795 | 1.24 s | 5.98 s | 4.8x |
mikro-orm | 2,883 | 1.20 s | 5.97 s | 5.0x |
Next.js | 2,881 | 0.28 s | 1.82 s | 6.4x |
Next.js, root | 3,547 | 0.42 s | 1.28 s | 3.1x |
Storybook | 1,039 | 0.27 s | 0.96 s | 3.5x |
Nuxt | 839 | 0.27 s | 0.80 s | 3.0x |
Playwright | 706 | 0.15 s | 0.64 s | 4.2x |
lit | 6 | 0.46 s | 2.12 s | 4.6x |
And it uses 2.2x to 4.9x less memory:
Project | Files |
|
| Less |
|---|---|---|---|---|
VS Code | 9,795 | 2.14 GB | 7.97 GB | 3.7x |
mikro-orm | 2,883 | 1.35 GB | 6.67 GB | 4.9x |
Next.js | 2,881 | 0.71 GB | 1.81 GB | 2.5x |
Next.js, root | 3,547 | 0.55 GB | 1.33 GB | 2.4x |
Storybook | 1,039 | 0.56 GB | 1.39 GB | 2.5x |
Nuxt | 839 | 0.51 GB | 1.14 GB | 2.2x |
Playwright | 706 | 0.46 GB | 1.06 GB | 2.3x |
lit | 6 | 0.24 GB | 0.63 GB | 2.6x |
It's a port of typescript-go. It reads your tsconfig.json, reports the same errors as tsc, and uses every CPU core. You don't need the typescript package installed.
It only type checks. It doesn't emit JavaScript or .d.ts files, and there's no language server, so your editor keeps using TypeScript.
bun run --check#
Type check, then run. If there's a type error, your code doesn't run.
bun run --check src/index.ts1 | import { greet } from "./user";
2 |
3 | console.log(greet({ id: "1", name: "Ada" }));
^
error: TS2322: Type 'string' is not assignable to type 'number'.
at src/index.ts:3:21
2 | id: number;
^
note: The expected type comes from property 'id' which is declared here on type 'User'
at src/user.ts:2:3
Found 1 error in 1 file, checked 2 files [24.00ms]It also works with package.json scripts (bun run --check dev) and with --watch, which checks again before every restart.
bun test --check#
Type check the test files and everything they import, then run the tests. If there's a type error, no tests run.
bun test --checkbun test v1.4.3
4 | test("greet", () => {
5 | expect(greet({ id: "1", name: "Ada" })).toBe("hello Ada");
^
error: TS2322: Type 'string' is not assignable to type 'number'.
at src/user.test.ts:5:18
2 | id: number;
^
note: The expected type comes from property 'id' which is declared here on type 'User'
at src/user.ts:2:3
Found 1 error in 1 file, checked 2 files [23.94ms]bun build --check#
Type check, then bundle. A type error fails the build like any other build error, and nothing is written.
bun build --check ./src/index.ts --outdir out3 | console.log(greet({ id: "1", name: "Ada" }));
^
error: TS2322: Type 'string' is not assignable to type 'number'.
at /app/src/index.ts:3:21
2 | id: number;
^
note: TS6500: The expected type comes from property 'id' which is declared here on type 'User'
at /app/src/user.ts:2:3Bun.build takes check: true.
Testing bun check#
Every commit of Bun runs TypeScript 7.0.2's complete conformance test suite (and we will continue to keep it up-to-date as TypeScript itself updates).
Baseline | What it checks | Tests | Passing |
|---|---|---|---|
Errors | Every error | 13,101 | 13,101 |
Types | The type of every expression | 12,463 | 12,463 |
Symbols | The symbol behind every name | 12,463 | 12,463 |
Declarations | Emitted | 13,032 | 13,032 |
Module resolution | How every import resolves | 151 | 151 |
Total | 51,210 | 51,210 |
72 misconfigured open-source projects
For a project as complex as a TypeScript type checker, conformance tests aren't enough, so we deliberately misconfigured 72 popular open-source repositories and compared bun check's output with tsc's output.
Missing node_modules, mismatched TypeScript versions, no build step. Every error has to match: same file, line, column and error code.
Project | Configs | Identical | Errors | Mismatches |
|---|---|---|---|---|
16 | 16 | 596 | 0 | |
7 | 7 | 559 | 0 | |
5 | 5 | 389 | 0 | |
1 | 1 | 105 | 0 | |
10 | 10 | 191 | 0 | |
3 | 3 | 1 | 0 | |
2 | 2 | 3 | 0 | |
3 | 3 | 10,786 | 0 | |
10 | 10 | 2 | 0 | |
4 | 4 | 53 | 0 | |
7 | 7 | 11,048 | 0 | |
2 | 2 | 1 | 0 | |
1 | 1 | 0 | 0 | |
2 | 2 | 3 | 0 | |
2 | 2 | 3 | 0 | |
3 | 3 | 24 | 0 | |
2 | 2 | 2 | 0 | |
6 | 6 | 14,239 | 0 | |
1 | 1 | 5 | 0 | |
1 | 1 | 1 | 0 | |
6 | 6 | 1,185 | 0 | |
41 | 41 | 5,273 | 0 | |
34 | 34 | 2,588 | 0 | |
4 | 4 | 22 | 0 | |
4 | 4 | 613 | 0 | |
microsoft/vscode, its own build | 1 | 1 | 0 | 0 |
microsoft/vscode, extensions and tests | 105 | 105 | 5,685 | 0 |
17 | 17 | 87,981 | 0 | |
1 | 1 | 3 | 0 | |
3 | 3 | 186 | 0 | |
10 | 10 | 5,878 | 0 | |
30 | 30 | 27,345 | 0 | |
3 | 3 | 11 | 0 | |
4 | 4 | 6 | 0 | |
2 | 2 | 7 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 1 | 0 | |
44 | 44 | 24,201 | 0 | |
10 | 10 | 2,701 | 0 | |
2 | 2 | 3 | 0 | |
10 | 10 | 22,271 | 0 | |
1 | 1 | 0 | 0 | |
8 | 8 | 142 | 0 | |
7 | 7 | 13 | 0 | |
14 | 14 | 6,735 | 0 | |
9 | 9 | 107 | 0 | |
16 | 16 | 6,768 | 0 | |
1 | 1 | 2 | 0 | |
2 | 2 | 52 | 0 | |
2 | 2 | 0 | 0 | |
7 | 7 | 740 | 0 | |
8 | 8 | 545 | 0 | |
19 | 19 | 1,401 | 0 | |
4 | 4 | 42 | 0 | |
5 | 5 | 186 | 0 | |
13 | 13 | 124 | 0 | |
15 | 15 | 686 | 0 | |
29 | 29 | 4,853 | 0 | |
20 | 20 | 574 | 0 | |
4 | 4 | 0 | 0 | |
2 | 2 | 4 | 0 | |
4 | 4 | 959 | 0 | |
35 | 35 | 18,392 | 0 | |
1 | 1 | 0 | 0 | |
5 | 5 | 742 | 0 | |
2 | 2 | 17 | 0 | |
52 | 52 | 9,742 | 0 | |
356 | 356 | 3,690 | 0 | |
4 | 4 | 314 | 0 | |
18 | 18 | 2,111 | 0 | |
6 | 5 | 1,359 | 1 | |
12 | 12 | 1,996 | 0 | |
All 72 | 1,103 | 1,102 | 286,267 | 1 |
The one mismatch is in vuejs/core. tsc only reports that error when global.ts comes before model.ts in files.
We ran 69 of them again under 11 other sets of compiler options:
Compiler options | Projects | Identical | Errors | Mismatches |
|---|---|---|---|---|
Every strictness flag on | 69 | 69 | 100,756 | 0 |
| 69 | 68 | 76,960 | 12 |
| 69 | 69 | 90,609 | 0 |
| 69 | 69 | 84,122 | 0 |
| 69 | 69 | 80,495 | 0 |
| 69 | 69 | 80,622 | 0 |
| 62 | 62 | 34,982 | 0 |
| 69 | 69 | 71,577 | 0 |
| 69 | 69 | 85,238 | 0 |
| 69 | 69 | 105,818 | 0 |
| 69 | 69 | 83,872 | 0 |
All 11 | 752 | 751 | 895,051 | 12 |
(节选)
原文:Bun Blog|Bun v1.4.3,2026-10-10
