HeadlinesBriefing favicon HeadlinesBriefing.com

Tsonic Brings TypeScript to Native Code

Hacker News: Front Page •
×

A new programming language called Tsonic allows developers to write TypeScript and compile it directly to native executables using .NET NativeAOT. This bridges the gap between web development and high-performance native applications.

The tool targets the .NET Base Class Library, letting developers access system APIs like file I/O, networking, and concurrency without a JavaScript runtime. It maintains TypeScript's syntax while adding CLR-style types such as `int` and `long`.

Developers can use familiar npm workflows to install Tsonic and manage dependencies. Projects build to single-file binaries for Linux and macOS, with support for ASP.NET Core and LINQ-style extensions. The project includes tools for generating .NET bindings.

Early adopters may find niche uses in performance-sensitive applications where JavaScript overhead is unacceptable. However, broad adoption depends on ecosystem maturity and community uptake within TypeScript circles.