According to Infoq, Dominic Gannaway has introduced TSRX, a new TypeScript language extension designed to provide a unified authoring syntax for building declarative user interfaces. The project is positioned as a spiritual successor to JSX, having been extracted from the Ripple framework but modified to remain independent of any specific runtime environment.
Framework-agnostic compilation and plugins
TSRX operates by compiling a single .tsrx component file into multiple output targets simultaneously. Rather than being tied to one library, it utilizes a plugin system where specific modules like @tsrx/react, @tsrx/preact, @tsrx/solid, and @tsrx/vue walk a shared Abstract Syntax Tree (AST) to emit idiomatic code for each respective framework. This architecture allows developers to add new targets as standalone compiler plugins without needing to modify the core language itself.
The technology introduces several syntax-level improvements intended to streamline UI development, including:
- Statement-level control flow using @if, @for, @switch, and @try directives.
- Prop shorthands and lazy destructuring for cleaner component definitions.
- Component-scoped styles that the compiler automatically rewrites with unique hashes.
- Declarative error and async boundaries expressed through @try, @catch, and @pending instead of wrapper components.
Ecosystem compatibility and adoption
While TSRX is currently in alpha, it offers broad integration support for modern build tools including Vite, Rspack, Turbopack, and Bun. Because a .tsrx file compiles into a standard .tsx equivalent, teams can adopt the technology on a per-file basis without requiring a full codebase migration. However, early documentation advises users to experiment with the tool rather than performing large-scale migrations immediately.
The release has sparked significant debate within the developer community regarding the future of web development syntax. While some users praise the ergonomic improvements, others argue that the industry should move toward functional builders like those found in Kotlin or F# to avoid the "XML inside JS" patterns that TSRX seeks to refine. Despite these debates, TSRX represents a notable shift toward standardized authoring syntaxes for the growing TypeScript ecosystem.