What changed
- infer portable
JSX.Elementreturns 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.vuefixture - typecheck and build pass
- lint reports zero errors and one pre-existing Markdown warning