@tsonic/dotnet-types
v10.0.0
Published
TypeScript declarations and metadata for .NET 10.0 assemblies
Maintainers
Readme
@tsonic/dotnet-types
TypeScript declarations and metadata for .NET 10.0
Version
.NET Version: 10.0.0-rc.1.25451.107 Package Version: 10.0.0 Assemblies: 38 (76 files) Generated: 2025-11-02
Installation
npm install @tsonic/[email protected]What's Included
This package provides TypeScript declaration files (.d.ts) and C# metadata (.metadata.json) for the .NET 10 Base Class Library:
- Collections - System.Collections, Concurrent, Immutable, Specialized
- LINQ - System.Linq, Expressions, Parallel, Queryable, AsyncEnumerable
- I/O - System.IO, FileSystem, Compression, Pipes
- Text - System.Text.Json, RegularExpressions, Encoding
- Networking - System.Net.Http, Sockets, WebSockets
- Threading - System.Threading, Tasks, Channels
- Data & XML - System.Data, System.Xml
- Security - System.Security.Cryptography, Claims
- Diagnostics - System.Diagnostics.Process, DiagnosticSource
- Core - System.Runtime, Console, ComponentModel, Reflection, Memory
Usage
With Tsonic Compiler
The Tsonic compiler will automatically discover these files when the package is installed:
// Your TypeScript code targeting .NET 10
import { List } from "System.Collections.Generic";
const names = new List<string>();
names.Add("Alice");File Structure
All type files are located in the types/ directory:
node_modules/@tsonic/dotnet-types/
├── types/
│ ├── index.json # Manifest
│ ├── System.Runtime.d.ts # Type declarations
│ ├── System.Runtime.metadata.json # C# metadata
│ └── ...
└── README.mdProgrammatic Access
import manifest from '@tsonic/dotnet-types/types/index.json';
console.log(manifest.dotnetVersion); // "10.0.0-rc.1.25451.107"
console.log(manifest.files); // Array of all type filesMetadata Files
Each .metadata.json file contains C# semantic information that TypeScript cannot express:
- Whether methods are
virtual,abstract,sealed, oroverride - Type kinds (class, struct, interface, enum)
- Base types and implemented interfaces
- Member accessibility (public, protected, private, internal)
The Tsonic compiler uses this metadata to generate correct C# code with proper inheritance semantics.
Other .NET Versions
This package contains declarations for .NET 10.0 only. For other versions:
- .NET 9:
npm install @tsonic/[email protected](coming soon) - .NET 11:
npm install @tsonic/[email protected](coming soon)
See the main repository for all available versions.
Regeneration
These files are generated artifacts. To regenerate:
- Use the generatedts tool
- Run against the .NET 10.0 runtime
- Copy output to this package
License
MIT - See LICENSE
