@tsonic/js 10.0.40 → 10.0.42
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/extensions/index.d.ts +81 -0
- package/bindings.json +42 -6
- package/core-globals.d.ts +1 -0
- package/globals.d.ts +52 -31
- package/index/bindings.json +10776 -0
- package/index/internal/index.d.ts +870 -0
- package/index.d.ts +4 -2
- package/package.json +6 -8
- package/tsonic.bindings.json +2 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Generated by tsbindgen - Extension Method Tables
|
|
2
|
+
// This file contains method-table interfaces for C# extension methods.
|
|
3
|
+
// Tables are scoped by declaring namespace (C# using semantics).
|
|
4
|
+
// For each namespace with extension methods, this file exports an ExtensionMethods_<Namespace> helper.
|
|
5
|
+
|
|
6
|
+
// Import namespace modules for cross-namespace type references
|
|
7
|
+
import * as System from "@tsonic/dotnet/System/internal/index.js";
|
|
8
|
+
import * as System_Collections_Generic from "@tsonic/dotnet/System.Collections.Generic/internal/index.js";
|
|
9
|
+
|
|
10
|
+
// Import primitive type aliases
|
|
11
|
+
import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/core/types.js';
|
|
12
|
+
|
|
13
|
+
// Import sticky extension scope helper
|
|
14
|
+
import type { Rewrap } from '@tsonic/core/lang.js';
|
|
15
|
+
|
|
16
|
+
// Import CLR type aliases for generic type arguments
|
|
17
|
+
import * as System_Internal from "@tsonic/dotnet/System/internal/index.js";
|
|
18
|
+
|
|
19
|
+
// Import unsafe type markers
|
|
20
|
+
import type { ptr } from '@tsonic/core/types.js';
|
|
21
|
+
|
|
22
|
+
// Internal helper types for sticky extension scopes
|
|
23
|
+
type __TsonicExtMapOf<T> = T extends { __tsonic_ext?: infer M } ? M : {};
|
|
24
|
+
type __TsonicMergeExtMaps<A, B> = A & B;
|
|
25
|
+
type __TsonicWithExt<TShape, K extends string, TApplier> = { __tsonic_ext?: __TsonicMergeExtMaps<__TsonicExtMapOf<TShape>, { [P in K]: TApplier }> };
|
|
26
|
+
|
|
27
|
+
// Extension method table for namespace: Tsonic.JSRuntime
|
|
28
|
+
interface __TsonicExtMethods_Tsonic_JSRuntime {
|
|
29
|
+
at(this: string, index: int): Rewrap<this, string>;
|
|
30
|
+
charAt(this: string, index: int): Rewrap<this, string>;
|
|
31
|
+
charCodeAt(this: string, index: int): Rewrap<this, int>;
|
|
32
|
+
codePointAt(this: string, index: int): Rewrap<this, int>;
|
|
33
|
+
concat(this: string, ...strings: string[]): Rewrap<this, string>;
|
|
34
|
+
endsWith(this: string, searchString: string): Rewrap<this, boolean>;
|
|
35
|
+
includes(this: string, searchString: string): Rewrap<this, boolean>;
|
|
36
|
+
indexOf(this: string, searchString: string, position?: int): Rewrap<this, int>;
|
|
37
|
+
isWellFormed(this: string): Rewrap<this, boolean>;
|
|
38
|
+
lastIndexOf(this: string, searchString: string, position?: System.Nullable_1<System_Internal.Int32>): Rewrap<this, int>;
|
|
39
|
+
length(this: string): Rewrap<this, int>;
|
|
40
|
+
localeCompare(this: string, compareString: string): Rewrap<this, int>;
|
|
41
|
+
match(this: string, pattern: string): Rewrap<this, System_Collections_Generic.List_1<System_Internal.String> | undefined>;
|
|
42
|
+
matchAll(this: string, pattern: string): Rewrap<this, System_Collections_Generic.List_1<System_Collections_Generic.List_1<System_Internal.String>>>;
|
|
43
|
+
normalize(this: string, form?: string): Rewrap<this, string>;
|
|
44
|
+
padEnd(this: string, targetLength: int, padString?: string): Rewrap<this, string>;
|
|
45
|
+
padStart(this: string, targetLength: int, padString?: string): Rewrap<this, string>;
|
|
46
|
+
repeat(this: string, count: int): Rewrap<this, string>;
|
|
47
|
+
replace(this: string, search: string, replacement: string): Rewrap<this, string>;
|
|
48
|
+
replaceAll(this: string, search: string, replacement: string): Rewrap<this, string>;
|
|
49
|
+
search(this: string, pattern: string): Rewrap<this, int>;
|
|
50
|
+
slice(this: string, start: int, end?: System.Nullable_1<System_Internal.Int32>): Rewrap<this, string>;
|
|
51
|
+
split(this: string, separator: string, limit?: System.Nullable_1<System_Internal.Int32>): Rewrap<this, System_Collections_Generic.List_1<System_Internal.String>>;
|
|
52
|
+
startsWith(this: string, searchString: string): Rewrap<this, boolean>;
|
|
53
|
+
substr(this: string, start: int, length?: System.Nullable_1<System_Internal.Int32>): Rewrap<this, string>;
|
|
54
|
+
substring(this: string, start: int, end?: System.Nullable_1<System_Internal.Int32>): Rewrap<this, string>;
|
|
55
|
+
toLocaleLowerCase(this: string): Rewrap<this, string>;
|
|
56
|
+
toLocaleUpperCase(this: string): Rewrap<this, string>;
|
|
57
|
+
toLowerCase(this: string): Rewrap<this, string>;
|
|
58
|
+
toString(this: double): Rewrap<this, string>;
|
|
59
|
+
toString(this: string): Rewrap<this, string>;
|
|
60
|
+
toUpperCase(this: string): Rewrap<this, string>;
|
|
61
|
+
toWellFormed(this: string): Rewrap<this, string>;
|
|
62
|
+
trim(this: string): Rewrap<this, string>;
|
|
63
|
+
trimEnd(this: string): Rewrap<this, string>;
|
|
64
|
+
trimLeft(this: string): Rewrap<this, string>;
|
|
65
|
+
trimRight(this: string): Rewrap<this, string>;
|
|
66
|
+
trimStart(this: string): Rewrap<this, string>;
|
|
67
|
+
valueOf(this: double): Rewrap<this, double>;
|
|
68
|
+
valueOf(this: string): Rewrap<this, string>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Generic helper type for extension methods in namespace: Tsonic.JSRuntime
|
|
72
|
+
interface __TsonicExtApplier_Tsonic_JSRuntime {
|
|
73
|
+
__tsonic_shape: unknown;
|
|
74
|
+
__tsonic_type: __TsonicExtMethods_Tsonic_JSRuntime;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type ExtensionMethods_Tsonic_JSRuntime<TShape> =
|
|
78
|
+
TShape extends null | undefined ? TShape
|
|
79
|
+
: TShape extends void ? void
|
|
80
|
+
: TShape & __TsonicWithExt<TShape, "Tsonic.JSRuntime", __TsonicExtApplier_Tsonic_JSRuntime> & __TsonicExtMethods_Tsonic_JSRuntime;
|
|
81
|
+
|
package/bindings.json
CHANGED
|
@@ -8,27 +8,32 @@
|
|
|
8
8
|
"Date": {
|
|
9
9
|
"kind": "global",
|
|
10
10
|
"assembly": "Tsonic.JSRuntime",
|
|
11
|
-
"type": "Tsonic.JSRuntime.Date"
|
|
11
|
+
"type": "Tsonic.JSRuntime.Date",
|
|
12
|
+
"staticType": "Tsonic.JSRuntime.Date"
|
|
12
13
|
},
|
|
13
14
|
"JSON": {
|
|
14
15
|
"kind": "global",
|
|
15
16
|
"assembly": "Tsonic.JSRuntime",
|
|
16
|
-
"type": "Tsonic.JSRuntime.JSON"
|
|
17
|
+
"type": "Tsonic.JSRuntime.JSON",
|
|
18
|
+
"staticType": "Tsonic.JSRuntime.JSON"
|
|
17
19
|
},
|
|
18
20
|
"Math": {
|
|
19
21
|
"kind": "global",
|
|
20
22
|
"assembly": "Tsonic.JSRuntime",
|
|
21
|
-
"type": "Tsonic.JSRuntime.Math"
|
|
23
|
+
"type": "Tsonic.JSRuntime.Math",
|
|
24
|
+
"staticType": "Tsonic.JSRuntime.Math"
|
|
22
25
|
},
|
|
23
26
|
"Number": {
|
|
24
27
|
"kind": "global",
|
|
25
28
|
"assembly": "Tsonic.JSRuntime",
|
|
26
|
-
"type": "Tsonic.JSRuntime.Number"
|
|
29
|
+
"type": "Tsonic.JSRuntime.Number",
|
|
30
|
+
"staticType": "Tsonic.JSRuntime.Number"
|
|
27
31
|
},
|
|
28
32
|
"RegExp": {
|
|
29
33
|
"kind": "global",
|
|
30
34
|
"assembly": "Tsonic.JSRuntime",
|
|
31
|
-
"type": "Tsonic.JSRuntime.RegExp"
|
|
35
|
+
"type": "Tsonic.JSRuntime.RegExp",
|
|
36
|
+
"staticType": "Tsonic.JSRuntime.RegExp"
|
|
32
37
|
},
|
|
33
38
|
"Map": {
|
|
34
39
|
"kind": "global",
|
|
@@ -42,10 +47,17 @@
|
|
|
42
47
|
"type": "Tsonic.JSRuntime.Set`1",
|
|
43
48
|
"csharpName": "Set"
|
|
44
49
|
},
|
|
50
|
+
"Object": {
|
|
51
|
+
"kind": "global",
|
|
52
|
+
"assembly": "Tsonic.JSRuntime",
|
|
53
|
+
"type": "Tsonic.JSRuntime.Object",
|
|
54
|
+
"staticType": "Tsonic.JSRuntime.Object"
|
|
55
|
+
},
|
|
45
56
|
"String": {
|
|
46
57
|
"kind": "global",
|
|
47
58
|
"assembly": "Tsonic.JSRuntime",
|
|
48
|
-
"type": "Tsonic.JSRuntime.String"
|
|
59
|
+
"type": "Tsonic.JSRuntime.String",
|
|
60
|
+
"staticType": "Tsonic.JSRuntime.String"
|
|
49
61
|
},
|
|
50
62
|
"Array": {
|
|
51
63
|
"kind": "global",
|
|
@@ -84,6 +96,30 @@
|
|
|
84
96
|
"type": "Tsonic.JSRuntime.Globals",
|
|
85
97
|
"csharpName": "Globals.isNaN"
|
|
86
98
|
},
|
|
99
|
+
"setTimeout": {
|
|
100
|
+
"kind": "global",
|
|
101
|
+
"assembly": "Tsonic.JSRuntime",
|
|
102
|
+
"type": "Tsonic.JSRuntime.Timers",
|
|
103
|
+
"csharpName": "Timers.setTimeout"
|
|
104
|
+
},
|
|
105
|
+
"clearTimeout": {
|
|
106
|
+
"kind": "global",
|
|
107
|
+
"assembly": "Tsonic.JSRuntime",
|
|
108
|
+
"type": "Tsonic.JSRuntime.Timers",
|
|
109
|
+
"csharpName": "Timers.clearTimeout"
|
|
110
|
+
},
|
|
111
|
+
"setInterval": {
|
|
112
|
+
"kind": "global",
|
|
113
|
+
"assembly": "Tsonic.JSRuntime",
|
|
114
|
+
"type": "Tsonic.JSRuntime.Timers",
|
|
115
|
+
"csharpName": "Timers.setInterval"
|
|
116
|
+
},
|
|
117
|
+
"clearInterval": {
|
|
118
|
+
"kind": "global",
|
|
119
|
+
"assembly": "Tsonic.JSRuntime",
|
|
120
|
+
"type": "Tsonic.JSRuntime.Timers",
|
|
121
|
+
"csharpName": "Timers.clearInterval"
|
|
122
|
+
},
|
|
87
123
|
"RangeError": {
|
|
88
124
|
"kind": "global",
|
|
89
125
|
"assembly": "Tsonic.JSRuntime",
|
package/core-globals.d.ts
CHANGED
package/globals.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { int, long
|
|
1
|
+
import type { int, long } from "@tsonic/core/types.js";
|
|
2
|
+
import type { Date as JSRuntimeDate } from "./index/internal/index.js";
|
|
2
3
|
|
|
3
4
|
declare global {
|
|
4
5
|
class RangeError extends Error {
|
|
@@ -58,24 +59,24 @@ declare global {
|
|
|
58
59
|
|
|
59
60
|
interface Number {
|
|
60
61
|
toString(): string;
|
|
61
|
-
valueOf():
|
|
62
|
+
valueOf(): number;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
interface NumberConstructor {
|
|
65
|
-
readonly EPSILON:
|
|
66
|
-
readonly MAX_SAFE_INTEGER:
|
|
67
|
-
readonly MAX_VALUE:
|
|
68
|
-
readonly MIN_SAFE_INTEGER:
|
|
69
|
-
readonly MIN_VALUE:
|
|
70
|
-
readonly NEGATIVE_INFINITY:
|
|
71
|
-
readonly POSITIVE_INFINITY:
|
|
72
|
-
readonly NaN:
|
|
73
|
-
isFinite(value:
|
|
74
|
-
isInteger(value:
|
|
75
|
-
isNaN(value:
|
|
76
|
-
isSafeInteger(value:
|
|
77
|
-
parseFloat(str: string):
|
|
78
|
-
parseInt(str: string, radix?:
|
|
66
|
+
readonly EPSILON: number;
|
|
67
|
+
readonly MAX_SAFE_INTEGER: number;
|
|
68
|
+
readonly MAX_VALUE: number;
|
|
69
|
+
readonly MIN_SAFE_INTEGER: number;
|
|
70
|
+
readonly MIN_VALUE: number;
|
|
71
|
+
readonly NEGATIVE_INFINITY: number;
|
|
72
|
+
readonly POSITIVE_INFINITY: number;
|
|
73
|
+
readonly NaN: number;
|
|
74
|
+
isFinite(value: number): boolean;
|
|
75
|
+
isInteger(value: number): boolean;
|
|
76
|
+
isNaN(value: number): boolean;
|
|
77
|
+
isSafeInteger(value: number): boolean;
|
|
78
|
+
parseFloat(str: string): number;
|
|
79
|
+
parseInt(str: string, radix?: number): number;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
interface Array<T> {
|
|
@@ -231,9 +232,7 @@ declare global {
|
|
|
231
232
|
of<T>(...items: T[]): T[];
|
|
232
233
|
}
|
|
233
234
|
|
|
234
|
-
interface Date {
|
|
235
|
-
toISOString(): string;
|
|
236
|
-
getTime(): long;
|
|
235
|
+
interface Date extends JSRuntimeDate {
|
|
237
236
|
}
|
|
238
237
|
|
|
239
238
|
interface DateConstructor {
|
|
@@ -249,10 +248,10 @@ declare global {
|
|
|
249
248
|
}
|
|
250
249
|
|
|
251
250
|
interface Math {
|
|
252
|
-
round(x:
|
|
253
|
-
max(...values: double[]):
|
|
254
|
-
min(...values: double[]):
|
|
255
|
-
random():
|
|
251
|
+
round(x: number): number;
|
|
252
|
+
max(...values: double[]): number;
|
|
253
|
+
min(...values: double[]): number;
|
|
254
|
+
random(): number;
|
|
256
255
|
}
|
|
257
256
|
|
|
258
257
|
interface RegExpMatchArray extends Array<string> {
|
|
@@ -275,8 +274,15 @@ declare global {
|
|
|
275
274
|
clear(): void;
|
|
276
275
|
delete(key: K): boolean;
|
|
277
276
|
get(key: K): V | undefined;
|
|
277
|
+
entries(): Iterable<[K, V]>;
|
|
278
|
+
forEach(callback: (value: V) => void): void;
|
|
279
|
+
forEach(callback: (value: V, key: K) => void): void;
|
|
280
|
+
forEach(callback: (value: V, key: K, map: Map<K, V>) => void): void;
|
|
278
281
|
has(key: K): boolean;
|
|
282
|
+
keys(): Iterable<K>;
|
|
279
283
|
set(key: K, value: V): this;
|
|
284
|
+
values(): Iterable<V>;
|
|
285
|
+
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
280
286
|
}
|
|
281
287
|
|
|
282
288
|
interface MapConstructor {
|
|
@@ -288,13 +294,26 @@ declare global {
|
|
|
288
294
|
add(value: T): this;
|
|
289
295
|
clear(): void;
|
|
290
296
|
delete(value: T): boolean;
|
|
297
|
+
entries(): Iterable<[T, T]>;
|
|
298
|
+
forEach(callback: (value: T) => void): void;
|
|
299
|
+
forEach(callback: (value: T, key: T) => void): void;
|
|
300
|
+
forEach(callback: (value: T, key: T, set: Set<T>) => void): void;
|
|
291
301
|
has(value: T): boolean;
|
|
302
|
+
keys(): Iterable<T>;
|
|
303
|
+
values(): Iterable<T>;
|
|
304
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
292
305
|
}
|
|
293
306
|
|
|
294
307
|
interface SetConstructor {
|
|
295
308
|
new<T = unknown>(values?: readonly T[] | null): Set<T>;
|
|
296
309
|
}
|
|
297
310
|
|
|
311
|
+
interface ObjectConstructor {
|
|
312
|
+
entries(obj: unknown): [string, unknown][];
|
|
313
|
+
keys(obj: unknown): string[];
|
|
314
|
+
values(obj: unknown): unknown[];
|
|
315
|
+
}
|
|
316
|
+
|
|
298
317
|
const String: StringConstructor;
|
|
299
318
|
|
|
300
319
|
const Number: NumberConstructor;
|
|
@@ -313,21 +332,23 @@ declare global {
|
|
|
313
332
|
|
|
314
333
|
const Set: SetConstructor;
|
|
315
334
|
|
|
316
|
-
|
|
335
|
+
const Object: ObjectConstructor;
|
|
336
|
+
|
|
337
|
+
function parseInt(str: string, radix?: number): number;
|
|
317
338
|
|
|
318
|
-
function parseFloat(str: string):
|
|
339
|
+
function parseFloat(str: string): number;
|
|
319
340
|
|
|
320
|
-
function isFinite(value:
|
|
341
|
+
function isFinite(value: number): boolean;
|
|
321
342
|
|
|
322
|
-
function isNaN(value:
|
|
343
|
+
function isNaN(value: number): boolean;
|
|
323
344
|
|
|
324
|
-
function setTimeout(handler: (...args: unknown[]) => void, timeout?:
|
|
345
|
+
function setTimeout(handler: (...args: unknown[]) => void, timeout?: number, ...args: unknown[]): number;
|
|
325
346
|
|
|
326
|
-
function clearTimeout(id:
|
|
347
|
+
function clearTimeout(id: number): void;
|
|
327
348
|
|
|
328
|
-
function setInterval(handler: (...args: unknown[]) => void, timeout?:
|
|
349
|
+
function setInterval(handler: (...args: unknown[]) => void, timeout?: number, ...args: unknown[]): number;
|
|
329
350
|
|
|
330
|
-
function clearInterval(id:
|
|
351
|
+
function clearInterval(id: number): void;
|
|
331
352
|
}
|
|
332
353
|
|
|
333
354
|
export {};
|