Generates C# Blazor Interop proxies from TypeScript definition files for seamless JavaScript library integration.
EventHorizon Blazor TypeScript Interop Generator is a .NET tool that automatically generates C# proxy classes from TypeScript definition files, allowing Blazor applications to call JavaScript libraries directly from C#. It solves the problem of manually writing interop code for JavaScript libraries in Blazor projects by providing a type-safe, generated interface.
Blazor developers who need to integrate JavaScript libraries (like BabylonJS) into their C# applications without writing low-level JavaScript interop code manually.
Developers choose this tool because it automates the tedious process of creating Blazor interop layers, supports both WebAssembly and Server hosting models, and generates a C#-friendly API that mirrors the original TypeScript definitions, improving productivity and reducing errors.
This project is a Blazor Interop C# Generator, has a sample against the BabylonJS library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates C# equivalents for constructors, properties, methods, async methods, and callbacks as listed in the supported APIs table, ensuring broad compatibility with TypeScript libraries like BabylonJS.
Offers both a fast .NET parser and a slower but modern NodeJS parser, allowing developers to choose based on TypeScript syntax complexity, though NodeJS is required for accurate parsing of modern code.
Produces code tailored for both Blazor WebAssembly and Server models using dedicated interop abstractions, simplifying integration across hosting environments as shown in the sample projects.
Available as a global .NET tool with configurable options like source file and host type, making it easy to integrate into build processes without manual coding.
The .NET parser is fast but cannot handle modern TypeScript syntax, forcing reliance on the slower NodeJS parser for accurate generation, which adds complexity and setup time.
Requires NodeJS >=20 to be installed for the NodeJS parser, adding an extra setup step and potential environment constraints that might not align with all .NET workflows.
When TypeScript definitions update, the entire proxy must be re-generated, which can be cumbersome and may introduce breaking changes if not carefully managed during development cycles.