Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
293 commits
Select commit Hold shift + click to select a range
293a4f0
sema: less waiting for locks, and the signature a call was resolved t…
Jarred-Sumner Oct 1, 2026
73e6624
sema: the candidate that was chosen for a call is not inferred for a …
Jarred-Sumner Oct 1, 2026
6c362fb
bun check: errors that fit the terminal
Jarred-Sumner Oct 1, 2026
b5784d4
sema: the development tool says how much memory the system counts aga…
Jarred-Sumner Oct 1, 2026
8df1b3d
bun check: a small file that takes long does not come last
Jarred-Sumner Oct 1, 2026
f3e3a93
bun check: says how far it has got
Jarred-Sumner Oct 1, 2026
729e2bc
sema: 11% fewer instructions in the stores, in resolving calls and in…
Jarred-Sumner Oct 1, 2026
81d9d53
sema: 11% fewer instructions in relations, declarations and shapes
Jarred-Sumner Oct 1, 2026
2bba770
sema: 5% fewer instructions in instantiation, unions, the query stack…
Jarred-Sumner Oct 1, 2026
84aa620
sema: 6% fewer instructions in the passes, the lowering and loading, …
Jarred-Sumner Oct 1, 2026
e3f0da4
bun check: what is wrong in compilerOptions is reported where it is w…
Jarred-Sumner Oct 1, 2026
04d9f45
sema: 5% fewer instructions in control flow analysis
Jarred-Sumner Oct 1, 2026
a2ff572
sema: what a union is called in a message does not go by timing
Jarred-Sumner Oct 1, 2026
0e250a7
bun check: TS7016 says which file has no types, and what to do about it
Jarred-Sumner Oct 1, 2026
317e8dd
sema: a file nothing refers to is read once
Jarred-Sumner Oct 1, 2026
f0c19fa
sema: where a default constructor is declared does not go by base types
Jarred-Sumner Oct 1, 2026
61bb834
bun check: no message is left with a hole in it
Jarred-Sumner Oct 1, 2026
492efff
sema: TypeScript's tests run the way typescript-go runs them, through…
Jarred-Sumner Oct 1, 2026
8182177
bun check: what is wrong with the options is said in full, and where
Jarred-Sumner Oct 1, 2026
2db6637
sema: two errors with the same code at the same place that say differ…
Jarred-Sumner Oct 1, 2026
5e96437
sema: where the implementation is, of an overload that does not go wi…
Jarred-Sumner Oct 1, 2026
6771311
bun check: measure the stack by its register, never run out of it sil…
Jarred-Sumner Oct 1, 2026
8005704
sema: what cannot be one symbol with what has the name adds nothing t…
Jarred-Sumner Oct 1, 2026
407ec50
sema: modules, imported helpers, duplicates and hints as typescript-g…
Jarred-Sumner Oct 1, 2026
b7bf59f
sema: errors reach as far as typescript-go's, and say where what they…
Jarred-Sumner Oct 1, 2026
b02b6b1
sema: names, expected types, configuration and global types as typesc…
Jarred-Sumner Oct 1, 2026
6317284
sema: calls and overloads as typescript-go says them
Jarred-Sumner Oct 1, 2026
6602f3a
sema: isolatedDeclarations
Jarred-Sumner Oct 1, 2026
d7b5ba2
sema: a variable referenced in its own initializer through a callback…
Jarred-Sumner Oct 1, 2026
707363a
sema: declaration emit diagnostics
Jarred-Sumner Oct 1, 2026
39dabcb
bun check: a named file means what it means in the project
Jarred-Sumner Oct 1, 2026
bab2741
sema: the arguments of an untyped call and what is yielded are looked…
Jarred-Sumner Oct 1, 2026
cdcce90
bun check: a project in a bad way does not drown you, and notes are s…
Jarred-Sumner Oct 1, 2026
e9e29c7
sema: a type parameter nothing is known of yet is no member of a unio…
Jarred-Sumner Oct 1, 2026
2873c53
sema: an array literal under `as const` is still an array literal to …
Jarred-Sumner Oct 1, 2026
def222a
sema: inference through function type aliases and conditional types; …
Jarred-Sumner Oct 1, 2026
13d5dab
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 1, 2026
c4c15f9
sema: overload resolution's first round, const contexts, regular obje…
Jarred-Sumner Oct 1, 2026
0a41dd3
bun check: never truncate file lists, plain wording in help and hints
Jarred-Sumner Oct 1, 2026
d4b8919
sema: fix the remaining false and missed errors found on a large real…
Jarred-Sumner Oct 1, 2026
79e8125
sema: false TS2589 on expect-type, and the remaining differences on B…
Jarred-Sumner Oct 1, 2026
4df40d7
sema: member order, expando arrays and other differences in how messa…
Jarred-Sumner Oct 1, 2026
f9ed1c3
sema: JSX tags of union type, declaration emit names, conditional con…
Jarred-Sumner Oct 1, 2026
69c111c
sema: parameter annotations of a function expression are known before…
Jarred-Sumner Oct 1, 2026
50f007e
sema: const contexts in overload resolution
Jarred-Sumner Oct 1, 2026
a236cb8
bun check: follow project references
Jarred-Sumner Oct 1, 2026
d0596ac
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 1, 2026
9134b1b
sema: use bun_core's SIMD string helpers for byte scans outside the c…
Jarred-Sumner Oct 1, 2026
8601d9d
js_parser: remove development switches from the type-syntax lowering,…
Jarred-Sumner Oct 1, 2026
eef589b
sema: constant element-access keys in narrowing, and instantiation li…
Jarred-Sumner Oct 1, 2026
cdb22a5
sema: four inference and constraint bugs found on a type-heavy library
Jarred-Sumner Oct 1, 2026
45a2c3e
sema: generic functions and nested calls as arguments, across the two…
Jarred-Sumner Oct 1, 2026
ae81de9
sema: unresolved modules and the error type, the JSX runtime module, …
Jarred-Sumner Oct 1, 2026
2ab7df5
sema: a deferred call is not resolved to find out why no overload pas…
Jarred-Sumner Oct 1, 2026
e944d73
sema: no thread-locals in the file layer, no debug counters in the lo…
Jarred-Sumner Oct 1, 2026
06d36f4
bun check: compiler options as flags
Jarred-Sumner Oct 1, 2026
d496d10
sema: fixes from eight open source projects
Jarred-Sumner Oct 1, 2026
47f16e1
bun check: import a referenced project's build output from its source
Jarred-Sumner Oct 1, 2026
2ba7900
sema: a mapped type has the alias that hosts it
Jarred-Sumner Oct 1, 2026
1c1cb72
sema: fix a race that lost the "unmeasurable" flag of a variance
Jarred-Sumner Oct 1, 2026
f546641
sema: literal arguments are checked twice, as in inferTypeArguments
Jarred-Sumner Oct 1, 2026
1de49b3
sema: cache a comparison whose cycles were closed inside it
Jarred-Sumner Oct 2, 2026
bb6ad99
sema: the type at every expression, and a hook that runs after each file
Jarred-Sumner Oct 2, 2026
9ea8312
sema: the type writer covers declaration, member and property names
Jarred-Sumner Oct 2, 2026
7e28e0b
sema: a type for errors, apart from `any`
Jarred-Sumner Oct 2, 2026
3249ea7
sema: produce the error type, and reproduce 70% of the `.types` basel…
Jarred-Sumner Oct 2, 2026
d9f1c40
sema: write `.symbols`, reuse annotations when printing, name unresol…
Jarred-Sumner Oct 2, 2026
59406c9
sema: 86% of the TypeScript suite reproduces errors, types and symbols
Jarred-Sumner Oct 2, 2026
01723ac
sema: one port of nodecopy.go, one walk for the writers, and no basel…
Jarred-Sumner Oct 2, 2026
76c539a
sema: index signatures know their declaration, one `Resolve` rule, on…
Jarred-Sumner Oct 2, 2026
c1a0d64
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 2, 2026
ab568e3
sema: member symbols in the binder, one walk for both writers, 3,000 …
Jarred-Sumner Oct 2, 2026
e1c21a8
sema: a type's alias and a union's origin are part of its identity
Jarred-Sumner Oct 2, 2026
f275d12
sema: declarations know where they start, properties know what they c…
Jarred-Sumner Oct 2, 2026
5f51437
sema: merged symbols are real clones, one call state, one of each tre…
Jarred-Sumner Oct 2, 2026
d15c0dc
sema: substitution types, one enclosing declaration for the node buil…
Jarred-Sumner Oct 2, 2026
83fea4e
sema: three more places give a type its alias, one `Resolve` with the…
Jarred-Sumner Oct 2, 2026
6993120
sema: a resolved call is not resolved twice, the exports of a module …
Jarred-Sumner Oct 2, 2026
d35f75d
sema: one order of types, `NoInfer` is a substitution type everywhere…
Jarred-Sumner Oct 2, 2026
1239dab
sema: an exported declaration has a local and an export symbol, alias…
Jarred-Sumner Oct 2, 2026
e8f742c
sema: statements know where they end, external library imports are a …
Jarred-Sumner Oct 2, 2026
11c4d92
sema: union members are stored in order, `checkSourceFile` runs for e…
Jarred-Sumner Oct 2, 2026
0d09200
sema: a diagnostic is buffered in the question that reports it, a def…
Jarred-Sumner Oct 2, 2026
e9f0aed
sema: declaration emit asks the one node builder, the walk reaches ty…
Jarred-Sumner Oct 2, 2026
bde0762
sema: property access reports where it computes, one `checkGrammarMod…
Jarred-Sumner Oct 2, 2026
8a99514
sema: `silentNeverType` and `unreachableNeverType` are types, an infe…
Jarred-Sumner Oct 2, 2026
4694131
sema: JSX positions leave the shared AST, `boolean` is a flag, `GetMo…
Jarred-Sumner Oct 2, 2026
891b235
sema: JSX positions leave the shared AST, one flow analysis, one node…
Jarred-Sumner Oct 2, 2026
63a2cec
sema: the error of a relation is its error chain, operators report wh…
Jarred-Sumner Oct 2, 2026
8198803
sema: the alias is a parameter of instantiation, every expando is a s…
Jarred-Sumner Oct 2, 2026
d5a2a9d
sema: `undefined` is a real symbol, a leading `|` makes a union node
Jarred-Sumner Oct 2, 2026
e1d5c95
sema: fix a stack overflow on `type T<X = T> = X`, the pass over oper…
Jarred-Sumner Oct 2, 2026
82bf16f
sema: a literal argument is checked under its parameter type, nothing…
Jarred-Sumner Oct 2, 2026
e06f0b9
sema: one `t.alias` with its type arguments filled where they are use…
Jarred-Sumner Oct 2, 2026
4e85756
sema: the regular type of an object literal is a type, `unknownSymbol…
Jarred-Sumner Oct 2, 2026
97ae52f
sema: the symbol `cloneTypeAsModuleType` makes is a real symbol, `get…
Jarred-Sumner Oct 2, 2026
f8fbd54
sema: module specifiers are worked out under `paths` and `rootDirs`
Jarred-Sumner Oct 2, 2026
002fc6b
sema: fixes for five tests and six open source projects
Jarred-Sumner Oct 2, 2026
366efbf
sema: names are qualified through `import * as ns` again, more tests …
Jarred-Sumner Oct 2, 2026
4276a30
sema: the harness emits before it writes types, interfaces are compar…
Jarred-Sumner Oct 2, 2026
baa6d68
sema: one parser, one pass
Jarred-Sumner Oct 2, 2026
71448d7
sema: the lowering does not read the source text, an abandoned parse …
Jarred-Sumner Oct 2, 2026
c8751b9
sema: one relater that reports, symbols made for aliases
Jarred-Sumner Oct 2, 2026
87cc698
sema: deferred type references
Jarred-Sumner Oct 2, 2026
af18a1a
sema: a location that is an index, and a lowering that holds no sourc…
Jarred-Sumner Oct 2, 2026
ec5e4ad
sema: names have no order, one outer inference context, `checkExterna…
Jarred-Sumner Oct 2, 2026
8cefd99
sema: the emulation of `Type.alias` is gone
Jarred-Sumner Oct 2, 2026
7c0b783
sema: type arguments are resolved when they are asked for
Jarred-Sumner Oct 2, 2026
ef775bd
sema: delete what is there twice, first batch
Jarred-Sumner Oct 2, 2026
6b055ac
sema: delete what is there twice, first batch
Jarred-Sumner Oct 2, 2026
d1ef0b5
sema: 2411 is reported at the name of the property
Jarred-Sumner Oct 2, 2026
8eef9f4
sema: members are symbols, and more of what is there twice goes
Jarred-Sumner Oct 2, 2026
38d8c82
sema: one node handle
Jarred-Sumner Oct 2, 2026
41ebd97
sema: put back what was there for speed
Jarred-Sumner Oct 2, 2026
f978c30
sema: keep the simplified form of a conditional type
Jarred-Sumner Oct 2, 2026
b9d44f4
bun check: documentation, and --noEmit takes a value
Jarred-Sumner Oct 2, 2026
a30164e
sema: what is expected of what a declaring assignment assigns
Jarred-Sumner Oct 2, 2026
5d5acbd
sema: the first checks on the node handle
Jarred-Sumner Oct 2, 2026
26a62e2
sema: one resolveAlias, and modules report where they are asked
Jarred-Sumner Oct 2, 2026
f00a3b4
sema: one resolveCall, and every node has its range from the parser
Jarred-Sumner Oct 2, 2026
e6950b0
bun check: no time limit, a better first run, and `bun init` knows ab…
Jarred-Sumner Oct 2, 2026
b1880a0
bun check: paths are bytes, and what CI found on Linux, Windows and ASAN
Jarred-Sumner Oct 2, 2026
86797d2
bun check: errors on project references, a race in overload resolutio…
Jarred-Sumner Oct 2, 2026
fe87ff7
bun check: use Bun's JSON parser, error printer and locks; one AST fo…
Jarred-Sumner Oct 2, 2026
4f24db6
bun check: never report success for a file that failed to parse; fix …
Jarred-Sumner Oct 3, 2026
f5de90f
Update check_command.rs
Jarred-Sumner Oct 3, 2026
cf05113
bun check: test the progress line in a terminal
Jarred-Sumner Oct 3, 2026
fb7d585
bun check: one output per project, `tsc -b` through declaration files…
Jarred-Sumner Oct 3, 2026
538d433
bun check: variances of mutually recursive types are measured in prog…
Jarred-Sumner Oct 3, 2026
7a480bb
sema: declaration files from JavaScript sources
Jarred-Sumner Oct 3, 2026
b341a93
sema: text is bytes
Jarred-Sumner Oct 3, 2026
78f7f45
sema: a check owns its threads' caches and returns its memory
Jarred-Sumner Oct 3, 2026
4030d99
sema: standard names for 206 identifiers
Jarred-Sumner Oct 3, 2026
092c3f6
bun build --check checks the scripts of an HTML entry point
Jarred-Sumner Oct 3, 2026
b9c15a8
sema: comments and names in standard vocabulary
Jarred-Sumner Oct 3, 2026
8e2d8b4
js_parser: ordinary builds no longer pay for the type checker
Jarred-Sumner Oct 3, 2026
87d0ea7
sema: an export that cannot merge is still the value its own block re…
Jarred-Sumner Oct 3, 2026
981e161
sema: undefined and null without strictNullChecks follow TypeScript's…
Jarred-Sumner Oct 3, 2026
b826dd4
sema: give up on an infinite type as soon as TypeScript does
Jarred-Sumner Oct 3, 2026
56e2df0
sema: a type cut off by the instantiation limit is stored only if it …
Jarred-Sumner Oct 3, 2026
6c47e0a
sema: three differences from typescript-go under the strictest options
Jarred-Sumner Oct 3, 2026
445bf64
sema: the key of `x[a.b]` can mark an import `a` as used
Jarred-Sumner Oct 3, 2026
7d2c39a
sema: two differences from typescript-go found by checking JavaScript
Jarred-Sumner Oct 3, 2026
0c675a2
sema: an aliased intersection loses its alias where its properties ar…
Jarred-Sumner Oct 3, 2026
86f503a
sema: four differences from typescript-go under isolatedDeclarations
Jarred-Sumner Oct 3, 2026
c9bed89
sema: five differences from typescript-go found under options project…
Jarred-Sumner Oct 3, 2026
e6dd705
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 3, 2026
2955cea
sema: a class has no construct signatures while its static index sign…
Jarred-Sumner Oct 3, 2026
3a6bc6a
sema: patterns inherited through `extends` are relative to the extend…
Jarred-Sumner Oct 3, 2026
3f03ad1
sema: the text of errors, compared with typescript-go
Jarred-Sumner Oct 3, 2026
f7385f2
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 3, 2026
7a2442d
sema: the default library is checked, and `target: es5` has one
Jarred-Sumner Oct 3, 2026
71fcf3f
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 4, 2026
c8a92b5
sema: TypeScript's tests run in CI, and 21 differences found in unsee…
Jarred-Sumner Oct 4, 2026
d728fe5
sema: cycles as typescript-go finds them, and 74 more tests
Jarred-Sumner Oct 4, 2026
8d1fe07
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 4, 2026
7895c1e
sema: `Bun.build({ check })`, and what generated programs found
Jarred-Sumner Oct 4, 2026
55b6d4b
sema: load and check every program once
Jarred-Sumner Oct 4, 2026
17f46ac
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 4, 2026
eb372cc
bundler: `filter` and `map` instead of `bool::then` in `filter_map`
Jarred-Sumner Oct 4, 2026
2435ca1
`bun build --check` reports type errors through the bundler's log
Jarred-Sumner Oct 4, 2026
9ff594b
sema: three errors that were missed silently, and the hint of TS7016
Jarred-Sumner Oct 4, 2026
b088682
`bun build --check` shows its progress in a terminal again
Jarred-Sumner Oct 4, 2026
fb502a5
sema: print an unresolved name from another file like typescript-go
Jarred-Sumner Oct 4, 2026
972261a
sema: compare every kind of typescript-go's baselines in CI, byte for…
Jarred-Sumner Oct 4, 2026
7a01da3
`bun check` supports `traceResolution`, and its log is compared in CI
Jarred-Sumner Oct 4, 2026
f77ac1e
sema: differences from typescript-go that only real projects show
Jarred-Sumner Oct 4, 2026
d2f084d
sema: less work in three hot spots, projects built concurrently, and …
Jarred-Sumner Oct 4, 2026
2c25137
sema: four places where the same work was done again and again
Jarred-Sumner Oct 4, 2026
e29acf9
sema: fix what the mordant lints report, and two more places of repea…
Jarred-Sumner Oct 4, 2026
4234e65
test: divide TypeScript's tests among eight test files
Jarred-Sumner Oct 4, 2026
e9d943a
Merge branch 'main' of https://github.com/oven-sh/bun into claude/bun…
Jarred-Sumner Oct 4, 2026
1b8f968
Update mordant-baseline.toml
Jarred-Sumner Oct 4, 2026
bbd1e4f
sema: remove fixtures that no test reads
Jarred-Sumner Oct 4, 2026
cfe6229
sema: the test runner does not use the streams of the standard library
Jarred-Sumner Oct 5, 2026
71d73f4
sema: remember the alias symbol of a type, and keep a filtered union …
Jarred-Sumner Oct 5, 2026
60e1c12
sema: two programs are not loaded at the same time
Jarred-Sumner Oct 5, 2026
8cbe551
check: what is checked, where it is found, and what happens under --w…
Jarred-Sumner Oct 5, 2026
02675a0
check: a `check` script keeps `bun check`, and `bun --check` is the t…
Jarred-Sumner Oct 5, 2026
43dea1d
check: one rule for the project of a file; fix --watch, Windows and p…
Jarred-Sumner Oct 5, 2026
d4317fc
check: `bun check .` is `bun check`, and a `check` script never start…
Jarred-Sumner Oct 5, 2026
4955eef
check: a directory argument takes its files from the projects, not fr…
Jarred-Sumner Oct 5, 2026
5b9270f
check: `bun --filter '*' check` runs the scripts again, and a `check`…
Jarred-Sumner Oct 5, 2026
4a07f03
check: a page's root-relative script under `./index.html`, and the pr…
Jarred-Sumner Oct 5, 2026
0205de6
check: tests for every flag of `bun check`, in every spelling [skip s…
Jarred-Sumner Oct 5, 2026
dbeee09
check: a path means the same however it is spelled, in five layouts […
Jarred-Sumner Oct 5, 2026
f122341
check: a JavaScript entry point leaves the project's options alone; a…
Jarred-Sumner Oct 5, 2026
8349804
check: no function call inside of `or` [skip size check]
Jarred-Sumner Oct 5, 2026
4e47abc
check: a file that is only named is not a source of the project; what…
Jarred-Sumner Oct 5, 2026
5e755ae
check: the test of a JavaScript entry point under a solution imports …
Jarred-Sumner Oct 5, 2026
5f9c64a
check: an entry point that stands for its imports does not stand for …
Jarred-Sumner Oct 5, 2026
d754773
sema: the lints of the workspace, as in every other crate [skip size …
Jarred-Sumner Oct 5, 2026
0e95a19
sema: a failed write is reported, and no exemption for what the works…
Jarred-Sumner Oct 5, 2026
8eb65c5
sema: seven exemptions from lints fixed in the code [skip size check]
Jarred-Sumner Oct 5, 2026
e99b84c
sema: the harness names a failed write by its code [skip size check]
Jarred-Sumner Oct 5, 2026
598fa15
check: the comparison with TypeScript 7 runs in CI [skip size check]
Jarred-Sumner Oct 5, 2026
e0814f5
sema: a file is one file, however its name is spelled
Jarred-Sumner Oct 5, 2026
2e3519e
sema: whether a file in node_modules is a root file is asked by path
Jarred-Sumner Oct 5, 2026
8327af3
test: an alias to an exact version is an exact version
Jarred-Sumner Oct 5, 2026
d8da4e3
check: `bun --check` checks the scripts of every page that is served
Jarred-Sumner Oct 5, 2026
14b1098
check: with `--check`, nothing runs unchecked
Jarred-Sumner Oct 5, 2026
db2d909
check: a `check` script that npm starts runs once, however deep `bun …
Jarred-Sumner Oct 5, 2026
25a6656
check: `--check` covers preloads, and a workspace keeps its own `chec…
Jarred-Sumner Oct 5, 2026
87e0055
docs: rewrite the `bun check` page, and mention `--check` where peopl…
Jarred-Sumner Oct 5, 2026
dc98789
sema: invalid values in tsconfig.json are reported as TypeScript 7 re…
Jarred-Sumner Oct 5, 2026
35ec20c
check: `bun check --cwd <missing>` frees the path before it exits
Jarred-Sumner Oct 5, 2026
09c61b6
check: `--check` leaves preloads alone again, and three smaller fixes
Jarred-Sumner Oct 5, 2026
aa14afc
check: TypeScript's `lib.*.d.ts` files are built in
Jarred-Sumner Oct 5, 2026
31cc800
sema: an absolute Windows path in an extended tsconfig.json stays as …
Jarred-Sumner Oct 5, 2026
bd040c3
check: say so when the dependencies are not installed
Jarred-Sumner Oct 5, 2026
81be2ef
check: notes that are only given where they help, and bunfig.toml is …
Jarred-Sumner Oct 5, 2026
b76db67
check: `--check` covers what it silently left out, and no save is mis…
Jarred-Sumner Oct 5, 2026
32e0386
check: what `--check` checks does not depend on the kind of project o…
Jarred-Sumner Oct 5, 2026
cf0520f
check: a tsconfig.json with values that are not JSON gets the errors …
Jarred-Sumner Oct 5, 2026
2b6e688
check: a build is checked like a run, and `Bun.build({ tsconfig })` i…
Jarred-Sumner Oct 6, 2026
d22da99
check: two wrong results, and `Bun.build({ tsconfig })` is as it was
Jarred-Sumner Oct 6, 2026
5448ed4
check: more about index signatures, and what was found on a large pro…
Jarred-Sumner Oct 6, 2026
fdb7791
check: a byte order mark in `files` of `Bun.build` is not a column
Jarred-Sumner Oct 6, 2026
eeef2f1
check: a property name that is written as a string is a string
Jarred-Sumner Oct 6, 2026
c5e98d5
test: the file in memory of the byte order mark test is in the project
Jarred-Sumner Oct 6, 2026
e9553d7
check: a property name that is bound late has the type of its expression
Jarred-Sumner Oct 6, 2026
203dc32
spawn: the SIGCHLD handler of the waiter thread restarts system calls
Jarred-Sumner Oct 6, 2026
d3e5157
check: a name that is missing before a `.` is `(Missing)` again
Jarred-Sumner Oct 6, 2026
70e17f0
check: a note says when the type check never ran
Jarred-Sumner Oct 6, 2026
ac087ab
check: an interface that extends a mapped type of itself
Jarred-Sumner Oct 6, 2026
0bfa164
check: an error without a file has no place in the list of groups
Jarred-Sumner Oct 6, 2026
f963c7e
check: nothing is inferred for a conditional type that is deferred
Jarred-Sumner Oct 6, 2026
1557022
check: what is resolved while base types are being resolved stays
Jarred-Sumner Oct 6, 2026
8dc01bd
test: a tsconfig.json whose root is a list
Jarred-Sumner Oct 6, 2026
da08acb
check: `interface D extends M<D>`, where `M<D>` is asked for first
Jarred-Sumner Oct 6, 2026
364a469
test: no timeouts of its own in differential.test.ts
Jarred-Sumner Oct 6, 2026
fe17889
check: `bun run --check` without a script or a file is `bun check`
Jarred-Sumner Oct 6, 2026
a17e4c7
check: with project references, the errors are those of `tsc -b`, in …
Jarred-Sumner Oct 6, 2026
aa8e0ae
check: a file that cannot be read is reported by its project
Jarred-Sumner Oct 6, 2026
273039d
Bun.build: read the `tsconfig` option
Jarred-Sumner Oct 6, 2026
e0d10c3
--tsconfig-override: a directory is the tsconfig.json in it
Jarred-Sumner Oct 6, 2026
fc61031
check: the constraint type of a mapped type whose key is circular is …
Jarred-Sumner Oct 6, 2026
b091cd2
check: `interface D extends M<D>` where `M<D>` is an intersection
Jarred-Sumner Oct 6, 2026
b908ab9
check: `false | true` is `boolean` whether the two are fresh or not
Jarred-Sumner Oct 6, 2026
f5a739b
check: what `export =` names is named after its file once the module …
Jarred-Sumner Oct 6, 2026
944bfd0
check: two programs that crashed
Jarred-Sumner Oct 6, 2026
e200723
check: three false errors in ordinary code
Jarred-Sumner Oct 6, 2026
80e3a45
check: port `getGenericObjectFlags` whole
Jarred-Sumner Oct 6, 2026
169401e
check: a project with references may not import whatever it likes
Jarred-Sumner Oct 6, 2026
07e56a2
check: finish about 340 functions that were ported in part
Jarred-Sumner Oct 6, 2026
604f73e
check: `bun check -b` says that it is a build
Jarred-Sumner Oct 6, 2026
c83ada6
check: pass `Paths` by reference
Jarred-Sumner Oct 6, 2026
93975d8
check: before `check`, `-b` is `--bun`
Jarred-Sumner Oct 6, 2026
8c058cb
check: finish about 735 more functions as typescript-go has them
Jarred-Sumner Oct 6, 2026
0ad8bcd
check: the programs that need a POSIX file name or a file system that…
Jarred-Sumner Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ test/js/node/test/common linguist-vendored

test/js/bun/css/files linguist-vendored

test/cli/check/typescript-go/bundle.zst binary linguist-vendored linguist-generated

.vscode/*.json linguist-language=JSON-with-Comments
src/cli/init/tsconfig.default.json linguist-language=JSON-with-Comments

Expand Down
66 changes: 66 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"src/bundler",
"src/collections",
"src/css",
"src/errno",

Check warning on line 11 in Cargo.toml

View workflow job for this annotation

GitHub Actions / lol-html cargo test

explicit `package.readme` can be inferred
"src/glob",
"src/http",
"src/install",
Expand All @@ -20,6 +20,10 @@
"src/paths",
"src/resolver",
"src/safety",
"src/sema",
"src/sema/baselines",
"src/sema/driver",
"src/sema/standalone",
"src/semver",
"src/sourcemap",
"src/sql",
Expand Down Expand Up @@ -185,7 +189,7 @@
# (`--cfg=...` + `--check-cfg=cfg(...)`) by scripts/build/rust.ts; register
# them here so a plain `cargo build` / `cargo check` (without those flags)
# doesn't warn.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bun_asan)', 'cfg(bun_debug)', 'cfg(socket_fault_injection)'] }
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bun_asan)', 'cfg(bun_debug)', 'cfg(socket_fault_injection)', 'cfg(bun_sema_mimalloc)'] }
# link.exe unconditionally prints "Creating library X.dll.lib and object
# X.dll.exp" to stdout when linking each proc-macro DLL on Windows hosts;
# there is no linker flag to suppress it. The lint already exempts itself
Expand Down Expand Up @@ -365,6 +369,9 @@
bun_paths = { path = "src/paths" }
bun_resolver = { path = "src/resolver" }
bun_safety = { path = "src/safety" }
bun_sema = { path = "src/sema" }
bun_sema_baselines = { path = "src/sema/baselines" }
bun_sema_driver = { path = "src/sema/driver" }
bun_semver = { path = "src/semver" }
bun_sourcemap = { path = "src/sourcemap" }
bun_sql = { path = "src/sql" }
Expand Down
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Bun statically links these libraries:
| A fork of [`uWebsockets`](https://github.com/jarred-sumner/uwebsockets) | Apache 2.0 licensed |
| Parts of [Tigerbeetle's IO code](https://github.com/tigerbeetle/tigerbeetle/blob/532c8b70b9142c17e07737ab6d3da68d7500cbca/src/io/windows.zig#L1) | Apache 2.0 licensed |
| `__cxa_thread_atexit` fallback from [LLVM libc++abi](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/libcxxabi/src/cxa_thread_atexit.cpp) | Apache 2.0 with LLVM exception |
| The type checker behind `bun check` is a port of [`typescript-go`](https://github.com/microsoft/typescript-go), and uses TypeScript's diagnostic messages and `lib.*.d.ts` files | Apache 2.0 |

## Polyfills

Expand Down
5 changes: 4 additions & 1 deletion completions/bun.bash
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ _bun_completions() {
declare -A PACKAGE_OPTIONS;
declare -A PM_OPTIONS;

local SUBCOMMANDS="dev bun create run install add remove upgrade completions discord help init pm x test repl update audit dedupe prune outdated link unlink build";
local SUBCOMMANDS="dev bun create run install add remove upgrade completions discord help init pm x test repl update audit dedupe prune outdated link unlink build check";

GLOBAL_OPTIONS[LONG_OPTIONS]="--use --cwd --bunfile --server-bunfile --config --disable-react-fast-refresh --disable-hmr --env-file --extension-order --jsx-factory --jsx-fragment --extension-order --jsx-factory --jsx-fragment --jsx-import-source --jsx-production --jsx-runtime --main-fields --no-summary --version --platform --public-dir --tsconfig-override --define --external --help --inject --loader --origin --port";
GLOBAL_OPTIONS[SHORT_OPTIONS]="-c -v -d -e -h -i -l -u -p";
Expand Down Expand Up @@ -191,6 +191,9 @@ _bun_completions() {
audit)
COMPREPLY=( $(compgen -W "fix ${PACKAGE_OPTIONS[AUDIT_OPTIONS_LONG]} ${PACKAGE_OPTIONS[AUDIT_OPTIONS_SHORT]}" -- "${cur_word}") );
return;;
check)
COMPREPLY=( $(compgen -f -W "--project --pretty --no-pretty --all --threads --timing --cwd --help -p -h" -- "${cur_word}") );
return;;
create|c)
COMPREPLY=( $(compgen -W "--force --no-install --help --no-git --verbose --no-package-json --open next react" -- "${cur_word}") );
return;;
Expand Down
10 changes: 9 additions & 1 deletion completions/bun.fish
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global
set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't update package.json or save a lockfile" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder"

set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add update audit dedupe prune init pm x repl
set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add update audit dedupe prune init pm x repl check
set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x update

function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts"
Expand Down Expand Up @@ -211,6 +211,14 @@ complete -c bun -n "__fish_use_subcommand" -a "pm" -d "Additional package manage
complete -c bun -n "__fish_use_subcommand" -a "x" -d "Execute a package binary, installing if needed" -f
complete -c bun -n "__fish_use_subcommand" -a "outdated" -d "Display the latest versions of outdated dependencies" -f
complete -c bun -n "__fish_use_subcommand" -a "audit" -d "Check installed packages for vulnerabilities" -f
complete -c bun -n "__fish_use_subcommand" -a "check" -d "Type check a TypeScript project" -f
complete -c bun -n "__fish_seen_subcommand_from check" -s "p" -l "project" -r -F -d "Path to a tsconfig.json or its directory"
complete -c bun -n "__fish_seen_subcommand_from check" -l "pretty" -d "Show source code around each error"
complete -c bun -n "__fish_seen_subcommand_from check" -l "no-pretty" -d "One line per error"
complete -c bun -n "__fish_seen_subcommand_from check" -l "all" -d "Show every error"
complete -c bun -n "__fish_seen_subcommand_from check" -l "threads" -r -d "Number of threads"
complete -c bun -n "__fish_seen_subcommand_from check" -l "timing" -d "Print load and check times"
complete -c bun -n "__fish_seen_subcommand_from check" -l "cwd" -r -d "Set the working directory"
complete -c bun -n "__fish_use_subcommand" -a "dedupe" -d "Remove duplicate versions from the lockfile" -f
complete -c bun -n "__fish_use_subcommand" -a "prune" -d "Remove packages that are not in the lockfile from node_modules" -f
complete -c bun -n "__fish_seen_subcommand_from audit; and not __fish_seen_subcommand_from fix" -a "fix" -d "Upgrade vulnerable packages to the lowest safe version" -f
Expand Down
26 changes: 26 additions & 0 deletions completions/bun.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,23 @@ _bun_prune_completion() {
ret=0
}

_bun_check_completion() {
_arguments -s -C \
'1: :->cmd1' \
'*: :_files' \
'--project[Path to a tsconfig.json or its directory]:project:_files' \
'-p[Path to a tsconfig.json or its directory]:project:_files' \
'--pretty[Show source code around each error]' \
'--no-pretty[One line per error]' \
'--all[Show every error]' \
'--threads[Number of threads]:threads' \
'--timing[Print load and check times]' \
'--cwd[Set the working directory]:cwd:_files -/' \
'--help[Print this help menu]' \
'-h[Print this help menu]' &&
ret=0
}

_bun_audit_completion() {
_arguments -s -C \
'1: :->cmd1' \
Expand Down Expand Up @@ -881,6 +898,7 @@ _bun() {
'remove\:"Remove a dependency from package.json (bun rm)" '
'update\:"Update outdated dependencies & save to package.json" '
'audit\:"Check installed packages for vulnerabilities" '
'check\:"Type check a TypeScript project" '
'dedupe\:"Remove duplicate versions from the lockfile" '
'prune\:"Remove packages that are not in the lockfile from node_modules" '
'outdated\:"Display the latest versions of outdated dependencies" '
Expand Down Expand Up @@ -967,6 +985,10 @@ _bun() {
audit)
_bun_audit_completion

;;
check)
_bun_check_completion

;;
dedupe)
_bun_dedupe_completion
Expand Down Expand Up @@ -1066,6 +1088,10 @@ _bun() {
audit)
_bun_audit_completion

;;
check)
_bun_check_completion

;;
dedupe)
_bun_dedupe_completion
Expand Down
35 changes: 34 additions & 1 deletion docs/bundler/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ Bundlers solve several problems:
- **Framework features.** Frameworks rely on bundler plugins & code transformations to implement common patterns like file-system routing, client-server code co-location (think `getServerSideProps` or Remix loaders), and server components.
- **Full-stack Applications.** Bun's bundler can handle both server and client code in a single command, enabling optimized production builds and single-file executables. With build-time HTML imports, you can bundle your entire application — frontend assets and backend server — into a single deployable unit.

<Note>The Bun bundler is not intended to replace `tsc` for typechecking or generating type declarations.</Note>
<Note>
`bun build` checks types only when you pass [`--check`](/runtime/check#check-before-you-run-build-or-test), or `check:
true` to `Bun.build`. It does not generate type declarations. Use `tsc` to produce `.d.ts` files.
</Note>

## Basic example

Expand Down Expand Up @@ -1284,6 +1287,27 @@ Removes function calls from a bundle. For example, `--drop=console` removes all
</Tab>
</Tabs>

### check

Type checks the entry points, and everything they import, before Bun writes any output. A type error fails the build like any other build error. See [`bun check`](/runtime/check#bun-build).

<Tabs>
<Tab title="JavaScript">
```ts title="build.ts" icon="/icons/typescript.svg"
await Bun.build({
entrypoints: ['./index.tsx'],
outdir: './out',
check: true,
})
```
</Tab>
<Tab title="CLI">
```bash terminal icon="terminal"
bun build ./index.tsx --outdir ./out --check
```
</Tab>
</Tabs>

### features

Enable compile-time feature flags for dead code elimination: conditionally include or exclude code paths at bundle time using `import { feature } from "bun:bundle"`.
Expand Down Expand Up @@ -1922,6 +1946,15 @@ interface BuildConfig {
*/
throw?: boolean;

/**
* Type check the entry points and everything they import before writing any output.
* A type error fails the build like any other build error.
* Equivalent to `--check` in the CLI.
*
* @default false
*/
check?: boolean;

/**
* Custom tsconfig.json file path to use for path resolution.
* Equivalent to `--tsconfig-override` in the CLI.
Expand Down
2 changes: 1 addition & 1 deletion docs/bundler/loaders.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Same as the `js` loader, but JSX syntax is supported. By default, Bun down-conve

**TypeScript loader.** Default for `.ts`, `.mts`, and `.cts`.

Strips out all TypeScript syntax, then behaves identically to the `js` loader. Bun does not perform typechecking.
Strips out all TypeScript syntax, then behaves identically to the `js` loader. The loader does not check types. Use [`bun check`](/runtime/check) to type check your project.

---

Expand Down
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"pages": [
"/runtime/index",
"/runtime/watch-mode",
"/runtime/check",
"/runtime/debugger",
"/runtime/repl",
"/runtime/bunfig",
Expand Down
18 changes: 18 additions & 0 deletions docs/guides/runtime/cicd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,22 @@ jobs:

---

To type check your project, run [`bun check`](/runtime/check#run-in-ci). GitHub shows each type error as an annotation on the pull request diff.

```yaml workflow.yml icon="file-code"
name: my-workflow
jobs:
my-job:
name: my-job
runs-on: ubuntu-latest
steps:
# ...
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun check # [!code ++]
```

---

See the [`setup-bun` README](https://github.com/oven-sh/setup-bun) for all options.
8 changes: 8 additions & 0 deletions docs/guides/runtime/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,12 @@ If you're using TypeScript 6.0 or later, you also need `"types": ["bun"]` in you

---

To type check your project, run [`bun check`](/runtime/check).

```sh terminal icon="terminal"
bun check
```

---

See [TypeScript](/runtime/typescript).
1 change: 1 addition & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Bun ships as a single, dependency-free binary and includes a runtime, package ma
- Package Manager: Fast installs, workspaces, overrides, and audits with `bun install`.
- Test Runner: Jest-compatible, TypeScript-first tests with snapshots, DOM, and watch mode.
- Bundler: Native bundling for JS/TS/JSX with splitting, plugins, and HTML imports.
- Type Checker: Check a TypeScript project on every CPU core with [`bun check`](/runtime/check).

Explore each area using the cards above. Each section is structured with an overview, short examples, reference, and best practices for fast scanning and deep dives.

Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Build a minimal HTTP server with `Bun.serve`, run it locally, then evolve it by
+ CLAUDE.md
+ .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc -> CLAUDE.md
+ index.ts
+ tsconfig.json (for editor autocomplete)
+ tsconfig.json (for bun check and editor autocomplete)
+ README.md
```

Expand Down
Loading
Loading