@tsonic/dotnet 10.0.39 → 10.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Internal/internal/index.d.ts +4 -3
- package/Microsoft.CSharp.RuntimeBinder/internal/index.d.ts +19 -18
- package/Microsoft.VisualBasic/internal/index.d.ts +52 -54
- package/Microsoft.VisualBasic.CompilerServices/internal/index.d.ts +117 -119
- package/Microsoft.VisualBasic.FileIO/internal/index.d.ts +3 -2
- package/Microsoft.Win32/internal/index.d.ts +19 -18
- package/Microsoft.Win32.SafeHandles/internal/index.d.ts +3 -2
- package/README.md +76 -104
- package/System/bindings.json +1520 -2039
- package/System/internal/index.d.ts +1549 -1602
- package/System.Buffers/bindings.json +12 -3
- package/System.Buffers/internal/index.d.ts +12 -14
- package/System.Buffers.Binary/internal/index.d.ts +2 -4
- package/System.Buffers.Text/internal/index.d.ts +2 -4
- package/System.CodeDom.Compiler/internal/index.d.ts +32 -31
- package/System.Collections/internal/index.d.ts +129 -131
- package/System.Collections.Concurrent/bindings.json +218 -218
- package/System.Collections.Concurrent/internal/index.d.ts +34 -36
- package/System.Collections.Frozen/bindings.json +413 -611
- package/System.Collections.Frozen/internal/index.d.ts +81 -97
- package/System.Collections.Frozen.d.ts +14 -2
- package/System.Collections.Generic/bindings.json +9420 -14155
- package/System.Collections.Generic/internal/index.d.ts +547 -758
- package/System.Collections.Generic.d.ts +1 -1
- package/System.Collections.Immutable/bindings.json +6000 -9080
- package/System.Collections.Immutable/internal/index.d.ts +265 -354
- package/System.Collections.Immutable.d.ts +49 -12
- package/System.Collections.ObjectModel/bindings.json +132 -654
- package/System.Collections.ObjectModel/internal/index.d.ts +10 -30
- package/System.Collections.Specialized/bindings.json +0 -123
- package/System.Collections.Specialized/internal/index.d.ts +88 -101
- package/System.ComponentModel/bindings.json +163 -102
- package/System.ComponentModel/internal/index.d.ts +618 -608
- package/System.ComponentModel.DataAnnotations/internal/index.d.ts +133 -132
- package/System.ComponentModel.DataAnnotations.Schema/internal/index.d.ts +8 -7
- package/System.ComponentModel.Design/bindings.json +22 -292
- package/System.ComponentModel.Design/internal/index.d.ts +101 -109
- package/System.ComponentModel.Design.Serialization/internal/index.d.ts +61 -60
- package/System.ComponentModel.d.ts +1 -0
- package/System.Configuration.Assemblies/internal/index.d.ts +3 -2
- package/System.Data/bindings.json +4 -1
- package/System.Data/internal/index.d.ts +351 -350
- package/System.Data.Common/internal/index.d.ts +151 -152
- package/System.Data.SqlTypes/internal/index.d.ts +68 -67
- package/System.Diagnostics/bindings.json +7044 -7249
- package/System.Diagnostics/internal/index.d.ts +446 -461
- package/System.Diagnostics.CodeAnalysis/internal/index.d.ts +44 -43
- package/System.Diagnostics.Contracts/internal/index.d.ts +16 -18
- package/System.Diagnostics.Metrics/internal/index.d.ts +92 -94
- package/System.Diagnostics.Metrics.d.ts +1 -1
- package/System.Diagnostics.SymbolStore/internal/index.d.ts +12 -11
- package/System.Diagnostics.Tracing/bindings.json +81 -21
- package/System.Diagnostics.Tracing/internal/index.d.ts +69 -56
- package/System.Diagnostics.Tracing.d.ts +2 -1
- package/System.Drawing/internal/index.d.ts +76 -75
- package/System.Dynamic/internal/index.d.ts +55 -57
- package/System.Formats.Asn1/bindings.json +48 -69
- package/System.Formats.Asn1/internal/index.d.ts +21 -28
- package/System.Formats.Tar/internal/index.d.ts +8 -7
- package/System.Globalization/internal/index.d.ts +40 -42
- package/System.IO/internal/index.d.ts +187 -189
- package/System.IO.Compression/internal/index.d.ts +29 -31
- package/System.IO.Enumeration/bindings.json +250 -250
- package/System.IO.Enumeration/internal/index.d.ts +15 -17
- package/System.IO.IsolatedStorage/internal/index.d.ts +19 -18
- package/System.IO.MemoryMappedFiles/internal/index.d.ts +11 -10
- package/System.IO.Pipelines/internal/index.d.ts +15 -17
- package/System.IO.Pipes/internal/index.d.ts +8 -7
- package/System.Linq/internal/index.d.ts +223 -225
- package/System.Linq.Expressions/internal/index.d.ts +205 -207
- package/System.Linq.Expressions.Interpreter/internal/index.d.ts +5 -4
- package/System.Net/bindings.json +104 -104
- package/System.Net/internal/index.d.ts +279 -281
- package/System.Net.Cache/internal/index.d.ts +3 -2
- package/System.Net.Http/internal/index.d.ts +128 -130
- package/System.Net.Http.Headers/bindings.json +0 -204
- package/System.Net.Http.Headers/internal/index.d.ts +111 -127
- package/System.Net.Http.Json/internal/index.d.ts +67 -69
- package/System.Net.Http.Metrics/internal/index.d.ts +6 -5
- package/System.Net.Mail/internal/index.d.ts +76 -78
- package/System.Net.Mime/internal/index.d.ts +11 -10
- package/System.Net.NetworkInformation/internal/index.d.ts +30 -32
- package/System.Net.Quic/internal/index.d.ts +10 -9
- package/System.Net.Security/internal/index.d.ts +87 -89
- package/System.Net.ServerSentEvents/internal/index.d.ts +6 -5
- package/System.Net.Sockets/internal/index.d.ts +91 -93
- package/System.Net.WebSockets/internal/index.d.ts +47 -46
- package/System.Numerics/bindings.json +544 -116
- package/System.Numerics/internal/index.d.ts +110 -112
- package/System.Reflection/internal/index.d.ts +270 -272
- package/System.Reflection.Emit/internal/index.d.ts +114 -116
- package/System.Reflection.Metadata/bindings.json +166 -3169
- package/System.Reflection.Metadata/internal/index.d.ts +154 -361
- package/System.Reflection.Metadata.Ecma335/internal/index.d.ts +13 -15
- package/System.Reflection.PortableExecutable/bindings.json +58 -0
- package/System.Reflection.PortableExecutable/internal/index.d.ts +24 -11
- package/System.Reflection.PortableExecutable.d.ts +1 -0
- package/System.Resources/internal/index.d.ts +33 -35
- package/System.Runtime/internal/index.d.ts +12 -11
- package/System.Runtime.CompilerServices/bindings.json +519 -717
- package/System.Runtime.CompilerServices/internal/index.d.ts +113 -137
- package/System.Runtime.CompilerServices.d.ts +14 -4
- package/System.Runtime.ConstrainedExecution/internal/index.d.ts +3 -2
- package/System.Runtime.ExceptionServices/internal/index.d.ts +4 -3
- package/System.Runtime.InteropServices/bindings.json +101 -101
- package/System.Runtime.InteropServices/internal/index.d.ts +234 -236
- package/System.Runtime.InteropServices.ComTypes/internal/index.d.ts +34 -36
- package/System.Runtime.InteropServices.Java/internal/index.d.ts +4 -6
- package/System.Runtime.InteropServices.JavaScript/bindings.json +328 -328
- package/System.Runtime.InteropServices.JavaScript/internal/index.d.ts +67 -69
- package/System.Runtime.InteropServices.JavaScript.d.ts +8 -26
- package/System.Runtime.InteropServices.Marshalling/bindings.json +2619 -2619
- package/System.Runtime.InteropServices.Marshalling/internal/index.d.ts +308 -310
- package/System.Runtime.InteropServices.ObjectiveC/bindings.json +141 -141
- package/System.Runtime.InteropServices.ObjectiveC/internal/index.d.ts +17 -19
- package/System.Runtime.InteropServices.Swift/internal/index.d.ts +4 -6
- package/System.Runtime.InteropServices.Swift.d.ts +1 -1
- package/System.Runtime.Intrinsics/bindings.json +64 -16
- package/System.Runtime.Intrinsics/internal/index.d.ts +22 -24
- package/System.Runtime.Intrinsics.Arm/internal/index.d.ts +12 -13
- package/System.Runtime.Intrinsics.Wasm/internal/index.d.ts +2 -4
- package/System.Runtime.Intrinsics.X86/internal/index.d.ts +42 -41
- package/System.Runtime.Loader/bindings.json +48 -69
- package/System.Runtime.Loader/internal/index.d.ts +30 -34
- package/System.Runtime.Remoting/internal/index.d.ts +5 -4
- package/System.Runtime.Serialization/internal/index.d.ts +175 -177
- package/System.Runtime.Serialization.DataContracts/internal/index.d.ts +29 -31
- package/System.Runtime.Serialization.Formatters/internal/index.d.ts +7 -6
- package/System.Runtime.Serialization.Formatters.Binary/internal/index.d.ts +10 -9
- package/System.Runtime.Serialization.Json/internal/index.d.ts +37 -36
- package/System.Runtime.Versioning/internal/index.d.ts +20 -19
- package/System.Security/internal/index.d.ts +64 -66
- package/System.Security.AccessControl/bindings.json +104 -0
- package/System.Security.AccessControl/internal/index.d.ts +59 -58
- package/System.Security.AccessControl.d.ts +6 -5
- package/System.Security.Authentication/internal/index.d.ts +7 -6
- package/System.Security.Authentication.ExtendedProtection/internal/index.d.ts +12 -11
- package/System.Security.Claims/internal/index.d.ts +45 -44
- package/System.Security.Cryptography/bindings.json +469 -469
- package/System.Security.Cryptography/internal/index.d.ts +269 -271
- package/System.Security.Cryptography.X509Certificates/bindings.json +0 -62
- package/System.Security.Cryptography.X509Certificates/internal/index.d.ts +98 -105
- package/System.Security.Permissions/internal/index.d.ts +5 -4
- package/System.Security.Policy/internal/index.d.ts +11 -10
- package/System.Security.Principal/internal/index.d.ts +28 -27
- package/System.Text/bindings.json +1562 -1562
- package/System.Text/internal/index.d.ts +119 -121
- package/System.Text.Encodings.Web/internal/index.d.ts +2 -4
- package/System.Text.Json/bindings.json +0 -290
- package/System.Text.Json/internal/index.d.ts +135 -153
- package/System.Text.Json.Nodes/internal/index.d.ts +60 -62
- package/System.Text.Json.Schema/internal/index.d.ts +9 -8
- package/System.Text.Json.Serialization/internal/index.d.ts +32 -34
- package/System.Text.Json.Serialization.Metadata/internal/index.d.ts +86 -85
- package/System.Text.Json.Serialization.d.ts +1 -1
- package/System.Text.RegularExpressions/bindings.json +198 -402
- package/System.Text.RegularExpressions/internal/index.d.ts +48 -64
- package/System.Text.Unicode/bindings.json +508 -508
- package/System.Text.Unicode/internal/index.d.ts +29 -31
- package/System.Threading/bindings.json +42 -42
- package/System.Threading/internal/index.d.ts +157 -159
- package/System.Threading.Channels/internal/index.d.ts +10 -12
- package/System.Threading.Tasks/bindings.json +4 -1
- package/System.Threading.Tasks/internal/index.d.ts +115 -114
- package/System.Threading.Tasks.Dataflow/internal/index.d.ts +32 -33
- package/System.Threading.Tasks.Sources/internal/index.d.ts +6 -5
- package/System.Timers/internal/index.d.ts +8 -7
- package/System.Transactions/internal/index.d.ts +31 -30
- package/System.Web/internal/index.d.ts +32 -31
- package/System.Windows.Input/internal/index.d.ts +5 -4
- package/System.Windows.Markup/internal/index.d.ts +3 -2
- package/System.Xml/internal/index.d.ts +383 -385
- package/System.Xml.Linq/internal/index.d.ts +103 -102
- package/System.Xml.Resolvers/internal/index.d.ts +10 -9
- package/System.Xml.Schema/bindings.json +76 -76
- package/System.Xml.Schema/internal/index.d.ts +233 -232
- package/System.Xml.Serialization/bindings.json +193 -0
- package/System.Xml.Serialization/internal/index.d.ts +277 -245
- package/System.Xml.Serialization.d.ts +2 -0
- package/System.Xml.XPath/internal/index.d.ts +46 -45
- package/System.Xml.Xsl/internal/index.d.ts +53 -52
- package/System.Xml.Xsl.Runtime/bindings.json +4 -1
- package/System.Xml.Xsl.Runtime/internal/index.d.ts +35 -37
- package/System.d.ts +2 -2
- package/__internal/extensions/index.d.ts +517 -515
- package/families.json +63 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,143 +1,115 @@
|
|
|
1
1
|
# @tsonic/dotnet
|
|
2
2
|
|
|
3
|
-
TypeScript
|
|
3
|
+
TypeScript declarations and CLR binding metadata for the .NET 10 base class library.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **.NET 10** → `versions/10/` → npm: `@tsonic/dotnet@10.x`
|
|
10
|
-
|
|
11
|
-
When publishing, run: `npm publish versions/10 --access public`
|
|
5
|
+
`@tsonic/dotnet` is a generated binding package. It gives Tsonic projects an
|
|
6
|
+
importable TypeScript surface for `Microsoft.NETCore.App` assemblies while the
|
|
7
|
+
compiled program still targets the real .NET runtime assemblies.
|
|
12
8
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
- ✅ **Complete .NET 10 BCL coverage** - 130 namespaces, 4,296 types, 50,675 members
|
|
16
|
-
- ✅ **camelCase members** - TypeScript-friendly naming conventions
|
|
17
|
-
- ✅ **Friendly generic aliases** - Use `List<T>` instead of `List_1<T>`
|
|
18
|
-
- ✅ **Primitive aliases** - `int`, `long`, `decimal`, etc. via `@tsonic/core`
|
|
19
|
-
- ✅ **Full type safety** - Zero TypeScript errors
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
9
|
+
## Install
|
|
22
10
|
|
|
23
11
|
```bash
|
|
24
12
|
npm install @tsonic/dotnet @tsonic/core
|
|
25
13
|
```
|
|
26
14
|
|
|
27
|
-
##
|
|
15
|
+
## Use with Tsonic
|
|
28
16
|
|
|
29
|
-
|
|
17
|
+
Default CLR workspaces include the BCL binding package in the normal compiler
|
|
18
|
+
setup. Import CLR namespaces explicitly:
|
|
30
19
|
|
|
31
|
-
```
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
|
|
35
|
-
const ages: List<int> = null!;
|
|
36
|
-
const prices: Dictionary<string, decimal> = null!;
|
|
37
|
-
const uniqueIds: HashSet<int> = null!;
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Async Programming
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import type { Task } from "@tsonic/dotnet/System.Threading.Tasks.js";
|
|
20
|
+
```ts
|
|
21
|
+
import { Console } from "@tsonic/dotnet/System.js";
|
|
22
|
+
import { List } from "@tsonic/dotnet/System.Collections.Generic.js";
|
|
44
23
|
import type { int } from "@tsonic/core/types.js";
|
|
45
24
|
|
|
46
|
-
|
|
25
|
+
export function main(): void {
|
|
26
|
+
const values = new List<int>();
|
|
27
|
+
values.Add(42);
|
|
28
|
+
Console.WriteLine(values.Count.ToString());
|
|
29
|
+
}
|
|
47
30
|
```
|
|
48
31
|
|
|
49
|
-
|
|
32
|
+
## Package shape
|
|
50
33
|
|
|
51
|
-
|
|
52
|
-
import type { Nullable, Action, Func } from "@tsonic/dotnet/System.js";
|
|
53
|
-
import type { int } from "@tsonic/core/types.js";
|
|
34
|
+
The package exposes one ESM facade per CLR namespace plus compiler metadata:
|
|
54
35
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
36
|
+
```text
|
|
37
|
+
@tsonic/dotnet/
|
|
38
|
+
System.d.ts
|
|
39
|
+
System.js
|
|
40
|
+
System/
|
|
41
|
+
bindings.json
|
|
42
|
+
internal/index.d.ts
|
|
43
|
+
System.Collections.Generic.d.ts
|
|
44
|
+
System.Collections.Generic.js
|
|
45
|
+
System.Collections.Generic/
|
|
46
|
+
bindings.json
|
|
47
|
+
internal/index.d.ts
|
|
48
|
+
__internal/extensions/index.d.ts
|
|
49
|
+
families.json
|
|
58
50
|
```
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
- `<Namespace>.d.ts` is the public import facade.
|
|
53
|
+
- `<Namespace>.js` is an ESM stub for package resolution.
|
|
54
|
+
- `<Namespace>/internal/index.d.ts` contains the full generated declaration surface.
|
|
55
|
+
- `<Namespace>/bindings.json` carries CLR identity, overload, receiver, extension,
|
|
56
|
+
nullable, and generic metadata for the Tsonic compiler.
|
|
57
|
+
- `__internal/extensions/index.d.ts` contains generated extension-method wrapper
|
|
58
|
+
types used for C#-style `using` semantics.
|
|
59
|
+
- `families.json` records multi-arity type families such as `Func`, `Action`, and
|
|
60
|
+
`ValueTuple`.
|
|
61
|
+
|
|
62
|
+
## Type model
|
|
63
|
+
|
|
64
|
+
- CLR type and member names are emitted with CLR-faithful casing.
|
|
65
|
+
- CLR primitives use `@tsonic/core/types.js` aliases such as `int`, `long`,
|
|
66
|
+
`double`, `bool`, and `char`.
|
|
67
|
+
- Generic CLR names keep their arity-safe declarations, with facade aliases for
|
|
68
|
+
common families.
|
|
69
|
+
- Delegates emit callable TypeScript types.
|
|
70
|
+
- `Task` and `ValueTask` are thenable in TypeScript positions.
|
|
71
|
+
- Extension methods are available through generated `ExtensionMethods` helpers.
|
|
72
|
+
|
|
73
|
+
Example extension-method wrapper:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import type { ExtensionMethods as Linq } from "@tsonic/dotnet/System.Linq.js";
|
|
77
|
+
import type { IEnumerable } from "@tsonic/dotnet/System.Collections.Generic.js";
|
|
64
78
|
import type { int } from "@tsonic/core/types.js";
|
|
65
79
|
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Package Structure
|
|
80
|
+
type LinqEnumerable<T> = Linq<IEnumerable<T>>;
|
|
70
81
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- **Metadata sidecars** - `metadata.json` files for CLR-specific info
|
|
74
|
-
- **Support types** - Unsafe markers (`ptr<T>`) and primitives imported from `@tsonic/core`
|
|
75
|
-
|
|
76
|
-
## Naming Conventions
|
|
77
|
-
|
|
78
|
-
- **Types**: PascalCase (matches .NET)
|
|
79
|
-
- **Members**: camelCase (TypeScript convention)
|
|
80
|
-
- **Generics**: Friendly aliases (`List<T>` vs `List_1<T>`)
|
|
81
|
-
|
|
82
|
-
## Examples
|
|
83
|
-
|
|
84
|
-
### File I/O
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
import type { Stream, FileStream } from "@tsonic/dotnet/System.IO.js";
|
|
82
|
+
declare const values: LinqEnumerable<int>;
|
|
83
|
+
const positive = values.Where((value) => value > 0);
|
|
88
84
|
```
|
|
89
85
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
import type { HttpClient } from "@tsonic/dotnet/System.Net.Http.js";
|
|
94
|
-
import type { IPAddress, Socket } from "@tsonic/dotnet/System.Net.js";
|
|
95
|
-
```
|
|
86
|
+
## Versioning
|
|
96
87
|
|
|
97
|
-
|
|
88
|
+
This repo is versioned by .NET major:
|
|
98
89
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```
|
|
90
|
+
- .NET 10 declarations live under `versions/10/`.
|
|
91
|
+
- The npm package is published as `@tsonic/dotnet@10.x`.
|
|
102
92
|
|
|
103
93
|
## Development
|
|
104
94
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
To regenerate TypeScript declarations from .NET assemblies:
|
|
95
|
+
Regenerate the .NET 10 package from a sibling `tsbindgen` checkout:
|
|
108
96
|
|
|
109
97
|
```bash
|
|
110
|
-
|
|
98
|
+
npm install
|
|
99
|
+
npm run generate:10
|
|
111
100
|
```
|
|
112
101
|
|
|
113
|
-
|
|
114
|
-
- .NET 10 SDK installed
|
|
115
|
-
- `tsbindgen` repository cloned at `../tsbindgen` (sibling directory)
|
|
116
|
-
|
|
117
|
-
The script will:
|
|
118
|
-
1. Clean existing namespace directories
|
|
119
|
-
2. Build tsbindgen
|
|
120
|
-
3. Generate fresh TypeScript declarations
|
|
102
|
+
The generation script requires:
|
|
121
103
|
|
|
122
|
-
|
|
123
|
-
- `
|
|
124
|
-
- `
|
|
104
|
+
- .NET 10 SDK/runtime
|
|
105
|
+
- `../tsbindgen`
|
|
106
|
+
- a `Microsoft.NETCore.App` runtime directory selected by `DOTNET_HOME` and
|
|
107
|
+
`DOTNET_VERSION`
|
|
125
108
|
|
|
126
|
-
|
|
109
|
+
Example for a system install:
|
|
127
110
|
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
├── families.json # Multi-arity family index
|
|
131
|
-
├── __internal/extensions/index.d.ts # Extension method buckets
|
|
132
|
-
├── System.d.ts # Facade (public API)
|
|
133
|
-
├── System.js # Runtime stub (throws)
|
|
134
|
-
├── System/
|
|
135
|
-
│ ├── bindings.json
|
|
136
|
-
│ └── internal/
|
|
137
|
-
│ ├── index.d.ts
|
|
138
|
-
│ └── metadata.json
|
|
139
|
-
├── ... (more namespaces)
|
|
140
|
-
└── __build/scripts/generate.sh # Type regeneration script
|
|
111
|
+
```bash
|
|
112
|
+
DOTNET_HOME=/usr/lib/dotnet DOTNET_VERSION=10.0.5 npm run generate:10
|
|
141
113
|
```
|
|
142
114
|
|
|
143
115
|
## License
|