UNPKG

@tsonic/dotnet-types

Version:

TypeScript declarations and metadata for .NET 10.0 assemblies

106 lines (71 loc) 3.18 kB
# @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 ```bash npm install @tsonic/dotnet-types@10.0.0 ``` ## 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: ```typescript // 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.md ``` ### Programmatic Access ```javascript 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 files ``` ## Metadata Files Each `.metadata.json` file contains C# semantic information that TypeScript cannot express: - Whether methods are `virtual`, `abstract`, `sealed`, or `override` - 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/dotnet-types@9.0.0` (coming soon) - .NET 11: `npm install @tsonic/dotnet-types@11.0.0` (coming soon) See the [main repository](https://github.com/tsoniclang/dotnet-types) for all available versions. ## Regeneration These files are generated artifacts. To regenerate: 1. Use the [generatedts tool](https://github.com/tsoniclang/tsonic/tree/main/tools/generatedts) 2. Run against the .NET 10.0 runtime 3. Copy output to this package ## License MIT - See [LICENSE](https://github.com/tsoniclang/dotnet-types/blob/main/LICENSE) ## Related - [Tsonic Compiler](https://github.com/tsoniclang/tsonic) - [All dotnet-types versions](https://github.com/tsoniclang/dotnet-types)