@tsonic/microsoft-extensions
v10.0.40
Published
TypeScript type definitions for Microsoft.Extensions.* (Hosting/DI/Logging/Configuration/Options) for .NET 10
Downloads
519
Maintainers
Readme
@tsonic/microsoft-extensions
TypeScript type definitions for Microsoft.Extensions.* (DI / Hosting / Logging / Configuration / Options) for .NET 10.
Generated by tsbindgen from the installed .NET shared framework and intended for use with the Tsonic compiler (TypeScript → .NET).
What this package is (and isn’t)
- ✅ TypeScript bindings (
.d.ts) forMicrosoft.Extensions.*namespaces. - ❌ Not a JavaScript runtime implementation (the
.jsfiles are module stubs for type-only use). - ✅ The real assemblies typically come from the
Microsoft.AspNetCore.Appshared framework (or equivalent NuGet packages).
Install (types)
npm install @tsonic/microsoft-extensions @tsonic/dotnet @tsonic/coreUse with Tsonic
Using the shared framework (recommended)
tsonic add framework Microsoft.AspNetCore.App @tsonic/microsoft-extensionsUsing NuGet packages
If you prefer NuGet-driven restores instead of the shared framework, add the packages you need:
tsonic add nuget Microsoft.Extensions.DependencyInjection <version> @tsonic/microsoft-extensionsImports
Import namespaces via explicit module paths:
import { ServiceCollection } from "@tsonic/microsoft-extensions/Microsoft.Extensions.DependencyInjection.js";Example (DI)
import { ServiceCollection } from "@tsonic/microsoft-extensions/Microsoft.Extensions.DependencyInjection.js";
export function main(): void {
const services = new ServiceCollection();
// services.AddSingleton(...), services.AddLogging(...), etc.
}Versioning
This repo is versioned by .NET major:
- .NET 10 → npm:
@tsonic/[email protected]
License
MIT
