@tsonic/dotnet 0.8.4 → 0.8.8

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/README.md CHANGED
@@ -4,16 +4,16 @@ TypeScript type definitions for .NET 10 BCL (Base Class Library).
4
4
 
5
5
  ## Features
6
6
 
7
- - ✅ **Complete .NET 10 BCL coverage** - 130 namespaces, 4,295 types, 50,720 members
7
+ - ✅ **Complete .NET 10 BCL coverage** - 130 namespaces, 4,296 types, 50,675 members
8
8
  - ✅ **camelCase members** - TypeScript-friendly naming conventions
9
9
  - ✅ **Friendly generic aliases** - Use `List<T>` instead of `List_1<T>`
10
- - ✅ **Branded primitive types** - Typed numbers via `@tsonic/types` (int, long, decimal, etc.)
10
+ - ✅ **Primitive aliases** - `int`, `long`, `decimal`, etc. via `@tsonic/core`
11
11
  - ✅ **Full type safety** - Zero TypeScript errors
12
12
 
13
13
  ## Installation
14
14
 
15
15
  ```bash
16
- npm install @tsonic/dotnet @tsonic/types
16
+ npm install @tsonic/dotnet @tsonic/core
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -21,8 +21,8 @@ npm install @tsonic/dotnet @tsonic/types
21
21
  ### Collections
22
22
 
23
23
  ```typescript
24
- import type { List, Dictionary, HashSet } from "@tsonic/dotnet/System.Collections.Generic";
25
- import type { int, decimal } from "@tsonic/types";
24
+ import type { List, Dictionary, HashSet } from "@tsonic/dotnet/System.Collections.Generic.js";
25
+ import type { int, decimal } from "@tsonic/core/types.js";
26
26
 
27
27
  const ages: List<int> = null!;
28
28
  const prices: Dictionary<string, decimal> = null!;
@@ -32,8 +32,8 @@ const uniqueIds: HashSet<int> = null!;
32
32
  ### Async Programming
33
33
 
34
34
  ```typescript
35
- import type { Task } from "@tsonic/dotnet/System.Threading.Tasks";
36
- import type { int } from "@tsonic/types";
35
+ import type { Task } from "@tsonic/dotnet/System.Threading.Tasks.js";
36
+ import type { int } from "@tsonic/core/types.js";
37
37
 
38
38
  const asyncResult: Task<int> = null!;
39
39
  ```
@@ -41,8 +41,8 @@ const asyncResult: Task<int> = null!;
41
41
  ### Core Types
42
42
 
43
43
  ```typescript
44
- import type { Nullable, Action, Func } from "@tsonic/dotnet/System";
45
- import type { int } from "@tsonic/types";
44
+ import type { Nullable, Action, Func } from "@tsonic/dotnet/System.js";
45
+ import type { int } from "@tsonic/core/types.js";
46
46
 
47
47
  const optional: Nullable<int> = null!;
48
48
  const callback: Action<int> = null!;
@@ -52,8 +52,8 @@ const converter: Func<int, string> = null!;
52
52
  ### LINQ
53
53
 
54
54
  ```typescript
55
- import type { IEnumerable, IQueryable } from "@tsonic/dotnet/System.Linq";
56
- import type { int } from "@tsonic/types";
55
+ import type { IEnumerable, IQueryable } from "@tsonic/dotnet/System.Linq.js";
56
+ import type { int } from "@tsonic/core/types.js";
57
57
 
58
58
  const sequence: IEnumerable<int> = null!;
59
59
  ```
@@ -63,7 +63,7 @@ const sequence: IEnumerable<int> = null!;
63
63
  - **130 namespaces** - All major .NET namespaces
64
64
  - **Flat ESM modules** - Clean import paths
65
65
  - **Metadata sidecars** - `metadata.json` files for CLR-specific info
66
- - **Support types** - All CLR interop types imported from `@tsonic/types` (ptr, ref, etc.)
66
+ - **Support types** - Unsafe markers (`ptr<T>`) and primitives imported from `@tsonic/core`
67
67
 
68
68
  ## Naming Conventions
69
69
 
@@ -76,20 +76,20 @@ const sequence: IEnumerable<int> = null!;
76
76
  ### File I/O
77
77
 
78
78
  ```typescript
79
- import type { Stream, FileStream } from "@tsonic/dotnet/System.IO";
79
+ import type { Stream, FileStream } from "@tsonic/dotnet/System.IO.js";
80
80
  ```
81
81
 
82
82
  ### Networking
83
83
 
84
84
  ```typescript
85
- import type { HttpClient } from "@tsonic/dotnet/System.Net.Http";
86
- import type { IPAddress, Socket } from "@tsonic/dotnet/System.Net";
85
+ import type { HttpClient } from "@tsonic/dotnet/System.Net.Http.js";
86
+ import type { IPAddress, Socket } from "@tsonic/dotnet/System.Net.js";
87
87
  ```
88
88
 
89
89
  ### Serialization
90
90
 
91
91
  ```typescript
92
- import type { JsonSerializer } from "@tsonic/dotnet/System.Text.Json";
92
+ import type { JsonSerializer } from "@tsonic/dotnet/System.Text.Json.js";
93
93
  ```
94
94
 
95
95
  ## Development
@@ -119,16 +119,17 @@ The script will:
119
119
 
120
120
  ```
121
121
  @tsonic/dotnet/
122
- ├── [Namespace]/ # .NET namespace directories (System, Microsoft, etc.)
123
- ├── index.d.ts # Public type declarations
124
- ├── index.js # ESM module stub
125
- ├── bindings.json # CLR↔TS name mappings
126
- │ └── internal/ # Internal implementation types
127
- ├── __internal/ # Extension method buckets
128
- │ └── extensions/
129
- └── __build/ # Build tooling
130
- └── scripts/
131
- └── generate.sh # Type regeneration script
122
+ ├── families.json # Multi-arity family index
123
+ ├── __internal/extensions/index.d.ts # Extension method buckets
124
+ ├── System.d.ts # Facade (public API)
125
+ ├── System.js # Runtime stub (throws)
126
+ ├── System/
127
+ ├── bindings.json
128
+ │ └── internal/
129
+ │ ├── index.d.ts
130
+ └── metadata.json
131
+ ├── ... (more namespaces)
132
+ └── __build/scripts/generate.sh # Type regeneration script
132
133
  ```
133
134
 
134
135
  ## License
@@ -30,6 +30,9 @@ export { MemoryManager_1 as MemoryManager } from './System.Buffers/internal/inde
30
30
  export { OperationStatus as OperationStatus } from './System.Buffers/internal/index.js';
31
31
  export { StandardFormat as StandardFormat } from './System.Buffers/internal/index.js';
32
32
 
33
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
34
+ export const SearchValues: typeof Internal.SearchValues$instance;
35
+
33
36
  // Multi-arity family sentinel (detects unspecified type parameters)
34
37
  declare const __unspecified: unique symbol;
35
38
  export type __ = typeof __unspecified;
@@ -21,6 +21,9 @@ export { EnumerablePartitionerOptions as EnumerablePartitionerOptions } from './
21
21
  export { ConcurrentQueue_1 as ConcurrentQueue } from './System.Collections.Concurrent/internal/index.js';
22
22
  export type IProducerConsumerCollection<T> = Internal.IProducerConsumerCollection_1<T>;
23
23
 
24
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
25
+ export const Partitioner: typeof Internal.Partitioner$instance;
26
+
24
27
  // Multi-arity family sentinel (detects unspecified type parameters)
25
28
  declare const __unspecified: unique symbol;
26
29
  export type __ = typeof __unspecified;
@@ -20,6 +20,9 @@ export { Collection_1 as Collection } from './System.Collections.ObjectModel/int
20
20
  export { ReadOnlyDictionary_2 as ReadOnlyDictionary } from './System.Collections.ObjectModel/internal/index.js';
21
21
  export { ReadOnlySet_1 as ReadOnlySet } from './System.Collections.ObjectModel/internal/index.js';
22
22
 
23
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
24
+ export const ReadOnlyCollection: typeof Internal.ReadOnlyCollection$instance;
25
+
23
26
  // Multi-arity family sentinel (detects unspecified type parameters)
24
27
  declare const __unspecified: unique symbol;
25
28
  export type __ = typeof __unspecified;
package/System.Data.d.ts CHANGED
@@ -128,6 +128,10 @@ export { InvalidExpressionException as InvalidExpressionException } from './Syst
128
128
  export { EvaluateException as EvaluateException } from './System.Data/internal/index.js';
129
129
  export { SyntaxErrorException as SyntaxErrorException } from './System.Data/internal/index.js';
130
130
 
131
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
132
+ export const DataRowComparer: typeof Internal.DataRowComparer$instance;
133
+ export const EnumerableRowCollection: typeof Internal.EnumerableRowCollection;
134
+
131
135
  // Multi-arity family sentinel (detects unspecified type parameters)
132
136
  declare const __unspecified: unique symbol;
133
137
  export type __ = typeof __unspecified;
@@ -30,6 +30,9 @@ export { ObservableInstrument_1 as ObservableInstrument } from './System.Diagnos
30
30
  export { ObservableUpDownCounter_1 as ObservableUpDownCounter } from './System.Diagnostics.Metrics/internal/index.js';
31
31
  export { UpDownCounter_1 as UpDownCounter } from './System.Diagnostics.Metrics/internal/index.js';
32
32
 
33
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
34
+ export const Instrument: typeof Internal.Instrument;
35
+
33
36
  // Multi-arity family sentinel (detects unspecified type parameters)
34
37
  declare const __unspecified: unique symbol;
35
38
  export type __ = typeof __unspecified;
@@ -674,7 +674,7 @@ export const Expression_1: {
674
674
  };
675
675
 
676
676
 
677
- export type Expression_1<TDelegate> = Expression_1$instance<TDelegate>;
677
+ export type Expression_1<TDelegate> = TDelegate | Expression_1$instance<TDelegate>;
678
678
 
679
679
  export interface ExpressionVisitor$instance {
680
680
  visit(node: Expression): Expression | undefined;
@@ -55,6 +55,9 @@ export { UnaryExpression as UnaryExpression } from './System.Linq.Expressions/in
55
55
  export { DynamicExpressionVisitor as DynamicExpressionVisitor } from './System.Linq.Expressions/internal/index.js';
56
56
  export { DynamicExpression as DynamicExpression } from './System.Linq.Expressions/internal/index.js';
57
57
 
58
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
59
+ export const Expression: typeof Internal.Expression;
60
+
58
61
  // Multi-arity family sentinel (detects unspecified type parameters)
59
62
  declare const __unspecified: unique symbol;
60
63
  export type __ = typeof __unspecified;
package/System.Linq.d.ts CHANGED
@@ -32,6 +32,11 @@ export { ParallelExecutionMode as ParallelExecutionMode } from './System.Linq/in
32
32
  export { ParallelMergeOptions as ParallelMergeOptions } from './System.Linq/internal/index.js';
33
33
  export { Queryable$instance as Queryable } from './System.Linq/internal/index.js';
34
34
 
35
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
36
+ export const EnumerableExecutor: typeof Internal.EnumerableExecutor;
37
+ export const EnumerableQuery: typeof Internal.EnumerableQuery;
38
+ export const ParallelQuery: typeof Internal.ParallelQuery;
39
+
35
40
  // Multi-arity family sentinel (detects unspecified type parameters)
36
41
  declare const __unspecified: unique symbol;
37
42
  export type __ = typeof __unspecified;
@@ -20,6 +20,9 @@ export { SseFormatter$instance as SseFormatter } from './System.Net.ServerSentEv
20
20
  export { SseItem_1 as SseItem } from './System.Net.ServerSentEvents/internal/index.js';
21
21
  export type SseItemParser<T> = Internal.SseItemParser_1<T>;
22
22
 
23
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
24
+ export const SseParser: typeof Internal.SseParser$instance;
25
+
23
26
  // Multi-arity family sentinel (detects unspecified type parameters)
24
27
  declare const __unspecified: unique symbol;
25
28
  export type __ = typeof __unspecified;
@@ -55,6 +55,9 @@ export type IUnsignedNumber<TSelf extends Internal.IUnsignedNumber_1<TSelf>> = I
55
55
  export { BigInteger as BigInteger } from './System.Numerics/internal/index.js';
56
56
  export { Complex as Complex } from './System.Numerics/internal/index.js';
57
57
 
58
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
59
+ export const Vector: typeof Internal.Vector$instance;
60
+
58
61
  // Multi-arity family sentinel (detects unspecified type parameters)
59
62
  declare const __unspecified: unique symbol;
60
63
  export type __ = typeof __unspecified;
@@ -172,6 +172,14 @@ export { CompilerMarshalOverride$instance as CompilerMarshalOverride } from './S
172
172
  export { IDispatchConstantAttribute as IDispatchConstantAttribute } from './System.Runtime.CompilerServices/internal/index.js';
173
173
  export { IUnknownConstantAttribute as IUnknownConstantAttribute } from './System.Runtime.CompilerServices/internal/index.js';
174
174
 
175
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
176
+ export const AsyncTaskMethodBuilder: typeof Internal.AsyncTaskMethodBuilder;
177
+ export const AsyncValueTaskMethodBuilder: typeof Internal.AsyncValueTaskMethodBuilder;
178
+ export const CallSite: typeof Internal.CallSite;
179
+ export const PoolingAsyncValueTaskMethodBuilder: typeof Internal.PoolingAsyncValueTaskMethodBuilder;
180
+ export const TaskAwaiter: typeof Internal.TaskAwaiter;
181
+ export const ValueTaskAwaiter: typeof Internal.ValueTaskAwaiter;
182
+
175
183
  // Multi-arity family sentinel (detects unspecified type parameters)
176
184
  declare const __unspecified: unique symbol;
177
185
  export type __ = typeof __unspecified;
@@ -40,6 +40,9 @@ export { JSType_Any as JSType_Any } from './System.Runtime.InteropServices.JavaS
40
40
  export type JSMarshalerArgument_ArgumentToManagedCallback<T> = Internal.JSMarshalerArgument_ArgumentToManagedCallback_1<T>;
41
41
  export type JSMarshalerArgument_ArgumentToJSCallback<T> = Internal.JSMarshalerArgument_ArgumentToJSCallback_1<T>;
42
42
 
43
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
44
+ export const JSType_Function: typeof Internal.JSType_Function;
45
+
43
46
  // Multi-arity family sentinel (detects unspecified type parameters)
44
47
  declare const __unspecified: unique symbol;
45
48
  export type __ = typeof __unspecified;
@@ -12,6 +12,9 @@ import type { Boolean as ClrBoolean, Int32, Object as ClrObject, String as ClrSt
12
12
  export { SwiftError as SwiftError } from './System.Runtime.InteropServices.Swift/internal/index.js';
13
13
  export { SwiftIndirectResult as SwiftIndirectResult } from './System.Runtime.InteropServices.Swift/internal/index.js';
14
14
 
15
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
16
+ export const SwiftSelf: typeof Internal.SwiftSelf;
17
+
15
18
  // Multi-arity family sentinel (detects unspecified type parameters)
16
19
  declare const __unspecified: unique symbol;
17
20
  export type __ = typeof __unspecified;
@@ -150,6 +150,9 @@ export { TypeLibVarFlags as TypeLibVarFlags } from './System.Runtime.InteropServ
150
150
  export { TypeLibVersionAttribute as TypeLibVersionAttribute } from './System.Runtime.InteropServices/internal/index.js';
151
151
  export { JsonMarshal$instance as JsonMarshal } from './System.Runtime.InteropServices/internal/index.js';
152
152
 
153
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
154
+ export const GCHandle: typeof Internal.GCHandle;
155
+
153
156
  // Multi-arity family sentinel (detects unspecified type parameters)
154
157
  declare const __unspecified: unique symbol;
155
158
  export type __ = typeof __unspecified;
@@ -11,6 +11,12 @@ import type { Boolean as ClrBoolean, Byte, Double, IEquatable_1, Int16, Int32, I
11
11
 
12
12
  // Public API exports (curated - no internal $instance/$views leakage)
13
13
 
14
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
15
+ export const Vector128: typeof Internal.Vector128$instance;
16
+ export const Vector256: typeof Internal.Vector256$instance;
17
+ export const Vector512: typeof Internal.Vector512$instance;
18
+ export const Vector64: typeof Internal.Vector64$instance;
19
+
14
20
  // Multi-arity family sentinel (detects unspecified type parameters)
15
21
  declare const __unspecified: unique symbol;
16
22
  export type __ = typeof __unspecified;
@@ -75,6 +75,11 @@ export { SemaphoreAuditRule as SemaphoreAuditRule } from './System.Security.Acce
75
75
  export { SemaphoreRights as SemaphoreRights } from './System.Security.AccessControl/internal/index.js';
76
76
  export { SemaphoreSecurity as SemaphoreSecurity } from './System.Security.AccessControl/internal/index.js';
77
77
 
78
+ // Multi-arity family value exports (arity-0 constructors/static namespaces)
79
+ export const AccessRule: typeof Internal.AccessRule;
80
+ export const AuditRule: typeof Internal.AuditRule;
81
+ export const ObjectSecurity: typeof Internal.ObjectSecurity;
82
+
78
83
  // Multi-arity family sentinel (detects unspecified type parameters)
79
84
  declare const __unspecified: unique symbol;
80
85
  export type __ = typeof __unspecified;