You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
infer portable JSX.Element returns for function, arrow, nullable, fragment, member-tag, generic, and class components
preserve forwardRef, memo, lazy, namespace, named, and type-only React imports when emitted declarations reference them
scan JSX initializer nesting correctly so default exports and following declarations are not swallowed
support named and nested higher-order component wrappers without broadening ordinary call inference
cover both semantic inference and isolated-declarations paths, including the Zig emitter
Why
JSX brackets were previously interpreted as comparisons, arithmetic, or generic arguments. This produced incorrect number/boolean component returns, dropped wrapper imports, and could consume declarations following a JSX initializer.
Validation
20 focused React declaration tests pass across the TypeScript and Zig engines
313 Zig/Bun integration tests pass
36 native type-inference tests pass
26 native root scanner/emitter tests pass
1,259 of 1,260 dtsx tests pass; the remaining pre-existing Vue test references the deleted packages/dtsx/test/fixtures/vue/NFTBurnButton.vue fixture
typecheck and build pass
lint reports zero errors and one pre-existing Markdown warning
Platform: linux x64 | Runtime: Bun 1.3.14 | Date: 2026-07-21
In-Process API — Cached
Smart caching (hash check + cache hit) for watch mode, incremental builds, and CI.
Tool
Small (~50 lines)
Medium (~100 lines)
Large (~330 lines)
XLarge (~1050 lines)
XXLarge (~2000 lines)
Huge (~5000 lines)
dtsx (cached)
3.7 µs
1.8 µs
1.5 µs
2.6 µs
5.9 µs
11.7 µs
zig-dtsx
14.4 µs (3.9x)
19.2 µs (10.8x)
62.7 µs (42.2x)
341.1 µs (132.8x)
357.6 µs (61.1x)
928.8 µs (79.2x)
oxc-transform
20.1 µs (5.4x)
64.2 µs (36.1x)
213.7 µs (143.9x)
1.10 ms (429.2x)
891.8 µs (152.4x)
2.22 ms (189.1x)
TypeScript 7 (CLI)
95.47 ms (25571.5x)
100.95 ms (56780.1x)
105.64 ms (71158.5x)
128.24 ms (49910.3x)
119.18 ms (20371.9x)
152.08 ms (12975.4x)
In-Process API — No Cache
Raw single-transform comparison (cache cleared every iteration).
Tool
Small (~50 lines)
Medium (~100 lines)
Large (~330 lines)
XLarge (~1050 lines)
XXLarge (~2000 lines)
Huge (~5000 lines)
zig-dtsx
14.4 µs (3.7x)
19.2 µs (7.4x)
62.7 µs (38.1x)
341.1 µs (112.6x)
357.6 µs (60.4x)
928.8 µs (72.2x)
oxc-transform
20.1 µs (5.1x)
64.2 µs (24.6x)
213.7 µs (129.9x)
1.10 ms (364.0x)
891.8 µs (150.5x)
2.22 ms (172.4x)
dtsx (no-cache)
3.9 µs
2.6 µs
1.6 µs
3.0 µs
5.9 µs
12.9 µs
TypeScript 7 (CLI)
95.47 ms (24460.6x)
100.95 ms (38754.8x)
105.64 ms (64226.4x)
128.24 ms (42332.4x)
119.18 ms (20118.7x)
152.08 ms (11829.5x)
Note: TypeScript 7 is CLI-only. Each measurement includes ~40ms process spawn overhead, so it is not directly comparable to the in-process tools above. It is reported separately from the in-process tools.
Multi-File Project
All tools processing files in-process sequentially.
Tool
50 files
100 files
zig-dtsx
5.78 ms (51.3x)
12.05 ms (20.1x)
dtsx
112.7 µs
598.4 µs
oxc-transform
17.27 ms (153.2x)
36.31 ms (60.7x)
tsc
537.79 ms (4771.6x)
1.03 s (1726.9x)
No previous benchmark found for regression comparison
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
JSX.Elementreturns for function, arrow, nullable, fragment, member-tag, generic, and class componentsforwardRef,memo,lazy, namespace, named, and type-only React imports when emitted declarations reference themWhy
JSX brackets were previously interpreted as comparisons, arithmetic, or generic arguments. This produced incorrect
number/booleancomponent returns, dropped wrapper imports, and could consume declarations following a JSX initializer.Validation
packages/dtsx/test/fixtures/vue/NFTBurnButton.vuefixture