# typesharp

> TypeSharp CLI - Automatically generate TypeScript from C# models. Keep your frontend and backend types in perfect sync! Supports nullable types, enums, inheritance, arrays, and custom naming conventio

- **URL**: https://www.freshcrate.ai/projects/typesharp
- **Author**: siyavuyachagi
- **Category**: Developer Tools
- **Latest version**: `v0.2.3` (2026-05-31)
- **License**: MIT
- **Source**: https://github.com/siyavuyachagi/typesharp
- **Homepage**: https://www.npmjs.com/package/@siyavuyachagi/typesharp?activeTab=readme
- **Language**: TypeScript
- **GitHub**: 2 stars
- **Registry**: github
- **Tags**: `aspnet-core`, `backend`, `code-generation`, `csharp`, `developer-tools`, `dotnet`, `frontend`, `fullstack`, `typescript`

## Description

TypeSharp CLI - Automatically generate TypeScript from C# models. Keep your frontend and backend types in perfect sync! Supports nullable types, enums, inheritance, arrays, and custom naming conventions. Perfect for ASP.NET Core + Vue/Nuxt/React projects.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v0.2.3` | 2026-05-31 | High | ## v0.2.3 - 2026-05-31  ### Summary  Improved generation accuracy, richer terminal output, and two new type mapping features.  ### Added  - **Region preservation** — `#region` / `#endregion` blocks in C# classes are now carried through to generated TypeScript interfaces as `// #region` comments, preserving logical grouping - **`TimeSpan` support** — maps to `number` (total milliseconds); works with nullable, arrays, and generics automatically  ### Fixed  - **Terminal output** — logs |
| `v0.2.2` | 2026-05-20 | High | ## v0.2.2 - 2026-05-20  ### Summary  - Improved error visibility with a dedicated logger and resolved a type mismatch bug in the mailer.  ### Added  - Logger (New logger to make error tracking more easily)  ### Fixed  - The "from" argument must be of type string. Received an instance of Array   ### Removed  - C# self-contained test project |
| `v0.2.1` | 2026-05-01 | High | ## v0.2.1 - 2026-05-01  ### Summary  Added `[Union]` attribute support for enums, generating a `const` object and derived union type instead of a standard TypeScript enum. Also fixed `init` accessor support for C# property parsing.  ### Added  - **`[Union]` enum support** — Enums decorated with `[TypeSharp]` and `[Union]` now generate a `const` object with `as const` and a union type derived from it, instead of a standard `export enum` - **Comma-syntax attribute support** — `[TypeSharp, |
| `v0.2.0` | 2026-04-12 | High | ## v0.2.0 - 2026-04-12  ### Summary  Improved output logging and cleaner CLI experience with optimized metrics reporting, silent change detection, and automatic cleanup on uninstall.  ### Added  - **ESLint integration** — Project-wide code quality checks with TypeScript support - **Prettier formatting** — Automatic code formatting for consistency - **Lint scripts** — `npm run lint`, `npm run lint:fix`, and `npm run format` commands - **Pre-uninstall cleanup** — Automatically removes ` |
| `v0.1.6` | 2026-04-11 | High | ## v0.1.6 - 2026-04-11  ### Summary  Comprehensive test suite completion with full CLI testing and incremental generation validation.  ### Added  - **CLI module tests** — 14 new test cases validating `init` and `generate` commands   - Config file creation in `.ts`, `.js`, and `.json` formats   - Missing config file error handling   - Empty source array handling   - Config overwrite prevention - **Incremental generation validation** — 5 passing tests confirming:   - File change dete |
| `v1.0.5` | 2026-04-07 | Medium | ## [0.1.5] - 2026-04-07  ### Summary  - Minor parser improvements - Minor parser improvements and CLI update  ### Added  - **C# interface filtering in inheritance** — classes inheriting from C# interfaces (e.g. `IActionResult`, `IDisposable`) no longer emit an `extends` clause in the generated TypeScript output. Only concrete base classes are preserved. Interface detection follows the standard C# naming convention (`I` followed by an uppercase letter). - **C# record support** — all rec |
| `v1.0.5-beta.0` | 2026-04-07 | Medium | - Minor improvements |
| `v1.0.4` | 2026-03-21 | Low | - Peer dependency fix |
| `v1.0.3` | 2026-03-21 | Low | - version bump |
| `v0.1.1` | 2026-02-19 | Low | <html> <body> <!--StartFragment--><html><head></head><body><h1>TypeSharp v0.1.1 Release Notes</h1> <p><strong>Released:</strong> 2026-02-19<br> <strong>Type:</strong> Minor release — new features + bug fixes<br> <strong>npm:</strong> <code>npm install @siyavuyachagi/typesharp@0.1.1</code></p> <hr> <h2>What's New</h2> <h3>Computed &amp; Block Getter Properties</h3> <p>TypeSharp can now parse all common C# property declaration styles, not just <code>{ get; set; }</code>. This release adds |

## Citation

- HTML: https://www.freshcrate.ai/projects/typesharp
- Markdown: https://www.freshcrate.ai/projects/typesharp.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/typesharp/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
