@tsonic/js 10.0.38 → 10.0.40

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/bindings.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "bindings": {
3
+ "console": {
4
+ "kind": "global",
5
+ "assembly": "Tsonic.JSRuntime",
6
+ "type": "Tsonic.JSRuntime.console"
7
+ },
8
+ "Date": {
9
+ "kind": "global",
10
+ "assembly": "Tsonic.JSRuntime",
11
+ "type": "Tsonic.JSRuntime.Date"
12
+ },
13
+ "JSON": {
14
+ "kind": "global",
15
+ "assembly": "Tsonic.JSRuntime",
16
+ "type": "Tsonic.JSRuntime.JSON"
17
+ },
18
+ "Math": {
19
+ "kind": "global",
20
+ "assembly": "Tsonic.JSRuntime",
21
+ "type": "Tsonic.JSRuntime.Math"
22
+ },
23
+ "Number": {
24
+ "kind": "global",
25
+ "assembly": "Tsonic.JSRuntime",
26
+ "type": "Tsonic.JSRuntime.Number"
27
+ },
28
+ "RegExp": {
29
+ "kind": "global",
30
+ "assembly": "Tsonic.JSRuntime",
31
+ "type": "Tsonic.JSRuntime.RegExp"
32
+ },
33
+ "Map": {
34
+ "kind": "global",
35
+ "assembly": "Tsonic.JSRuntime",
36
+ "type": "Tsonic.JSRuntime.Map`2",
37
+ "csharpName": "Map"
38
+ },
39
+ "Set": {
40
+ "kind": "global",
41
+ "assembly": "Tsonic.JSRuntime",
42
+ "type": "Tsonic.JSRuntime.Set`1",
43
+ "csharpName": "Set"
44
+ },
45
+ "String": {
46
+ "kind": "global",
47
+ "assembly": "Tsonic.JSRuntime",
48
+ "type": "Tsonic.JSRuntime.String"
49
+ },
50
+ "Array": {
51
+ "kind": "global",
52
+ "assembly": "Tsonic.JSRuntime",
53
+ "type": "Tsonic.JSRuntime.JSArray`1",
54
+ "staticType": "Tsonic.JSRuntime.JSArrayStatics",
55
+ "csharpName": "JSArray"
56
+ },
57
+ "ReadonlyArray": {
58
+ "kind": "global",
59
+ "assembly": "Tsonic.JSRuntime",
60
+ "type": "Tsonic.JSRuntime.JSArray`1",
61
+ "csharpName": "JSArray"
62
+ },
63
+ "parseInt": {
64
+ "kind": "global",
65
+ "assembly": "Tsonic.JSRuntime",
66
+ "type": "Tsonic.JSRuntime.Globals",
67
+ "csharpName": "Globals.parseInt"
68
+ },
69
+ "parseFloat": {
70
+ "kind": "global",
71
+ "assembly": "Tsonic.JSRuntime",
72
+ "type": "Tsonic.JSRuntime.Globals",
73
+ "csharpName": "Globals.parseFloat"
74
+ },
75
+ "isFinite": {
76
+ "kind": "global",
77
+ "assembly": "Tsonic.JSRuntime",
78
+ "type": "Tsonic.JSRuntime.Globals",
79
+ "csharpName": "Globals.isFinite"
80
+ },
81
+ "isNaN": {
82
+ "kind": "global",
83
+ "assembly": "Tsonic.JSRuntime",
84
+ "type": "Tsonic.JSRuntime.Globals",
85
+ "csharpName": "Globals.isNaN"
86
+ },
87
+ "RangeError": {
88
+ "kind": "global",
89
+ "assembly": "Tsonic.JSRuntime",
90
+ "type": "Tsonic.JSRuntime.RangeError"
91
+ },
92
+ "Error": {
93
+ "kind": "global",
94
+ "assembly": "Tsonic.JSRuntime",
95
+ "type": "Tsonic.JSRuntime.Error"
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,205 @@
1
+ declare global {
2
+ class Error {
3
+ name: string;
4
+ message: string;
5
+ stack?: string;
6
+ constructor(message?: string);
7
+ }
8
+
9
+ interface Function {
10
+ prototype: any;
11
+ }
12
+
13
+ interface CallableFunction extends Function {
14
+ }
15
+
16
+ interface NewableFunction extends Function {
17
+ }
18
+
19
+ interface IArguments {
20
+ }
21
+
22
+ interface RegExp {
23
+ }
24
+
25
+ interface ImportMeta {
26
+ }
27
+
28
+ interface String {
29
+ }
30
+
31
+ interface Number {
32
+ }
33
+
34
+ interface Boolean {
35
+ }
36
+
37
+ interface Object {
38
+ constructor: Function;
39
+ }
40
+
41
+ interface SymbolConstructor {
42
+ readonly iterator: symbol;
43
+ readonly asyncIterator: symbol;
44
+ readonly hasInstance: symbol;
45
+ readonly isConcatSpreadable: symbol;
46
+ readonly species: symbol;
47
+ readonly toPrimitive: symbol;
48
+ readonly toStringTag: symbol;
49
+ }
50
+
51
+ interface Array<T> {
52
+ [n: number]: T;
53
+ readonly length: number;
54
+ [Symbol.iterator](): IterableIterator<T>;
55
+ }
56
+
57
+ interface ReadonlyArray<T> {
58
+ readonly [n: number]: T;
59
+ readonly length: number;
60
+ [Symbol.iterator](): IterableIterator<T>;
61
+ }
62
+
63
+ interface ArrayConstructor {
64
+ new<T>(size?: number): T[];
65
+ }
66
+
67
+ interface Promise<T> {
68
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: | ((value: T) => TResult1 | PromiseLike<TResult1>)
69
+ | undefined
70
+ | null, onrejected?: | ((reason: any) => TResult2 | PromiseLike<TResult2>)
71
+ | undefined
72
+ | null): Promise<TResult1 | TResult2>;
73
+ catch<TResult = never>(onrejected?: | ((reason: any) => TResult | PromiseLike<TResult>)
74
+ | undefined
75
+ | null): Promise<T | TResult>;
76
+ finally(onfinally?: (() => void) | undefined | null): Promise<T>;
77
+ }
78
+
79
+ interface PromiseLike<T> {
80
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: | ((value: T) => TResult1 | PromiseLike<TResult1>)
81
+ | undefined
82
+ | null, onrejected?: | ((reason: any) => TResult2 | PromiseLike<TResult2>)
83
+ | undefined
84
+ | null): PromiseLike<TResult1 | TResult2>;
85
+ }
86
+
87
+ interface PromiseConstructor {
88
+ new<T>(executor: (
89
+ resolve: (value: T | PromiseLike<T>) => void,
90
+ reject: (reason?: any) => void
91
+ ) => void): Promise<T>;
92
+ resolve(): Promise<void>;
93
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
94
+ reject<T = never>(reason?: any): Promise<T>;
95
+ all<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
96
+ race<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T>;
97
+ }
98
+
99
+ interface Iterator<T, TReturn = any, TNext = undefined> {
100
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
101
+ return(value?: TReturn): IteratorResult<T, TReturn>;
102
+ throw(e?: any): IteratorResult<T, TReturn>;
103
+ }
104
+
105
+ interface IteratorResult<T, TReturn = any> {
106
+ done: boolean;
107
+ value: T | TReturn;
108
+ }
109
+
110
+ interface IteratorYieldResult<T> {
111
+ done: false;
112
+ value: T;
113
+ }
114
+
115
+ interface IteratorReturnResult<TReturn> {
116
+ done: true;
117
+ value: TReturn;
118
+ }
119
+
120
+ interface Iterable<T, TReturn = any, TNext = undefined> {
121
+ [Symbol.iterator](): Iterator<T, TReturn, TNext>;
122
+ }
123
+
124
+ interface IterableIterator<T, TReturn = any, TNext = undefined> extends Iterator<T, TReturn, TNext> {
125
+ [Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
126
+ }
127
+
128
+ interface AsyncIterator<T, TReturn = any, TNext = undefined> {
129
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
130
+ return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
131
+ throw(e?: any): Promise<IteratorResult<T, TReturn>>;
132
+ }
133
+
134
+ interface AsyncIterable<T, TReturn = any, TNext = undefined> {
135
+ [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
136
+ }
137
+
138
+ interface AsyncIterableIterator<T, TReturn = any, TNext = undefined> extends AsyncIterator<T, TReturn, TNext> {
139
+ [Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
140
+ }
141
+
142
+ interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {
143
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
144
+ return(value: TReturn): IteratorResult<T, TReturn>;
145
+ throw(e: any): IteratorResult<T, TReturn>;
146
+ [Symbol.iterator](): Generator<T, TReturn, TNext>;
147
+ }
148
+
149
+ interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
150
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
151
+ return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
152
+ throw(e: any): Promise<IteratorResult<T, TReturn>>;
153
+ [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
154
+ }
155
+
156
+ interface TemplateStringsArray extends ReadonlyArray<string> {
157
+ readonly raw: readonly string[];
158
+ }
159
+
160
+ type PropertyKey = string | number | symbol;
161
+
162
+ type Partial<T> = { [P in keyof T]?: T[P] };
163
+
164
+ type Required<T> = { [P in keyof T]-?: T[P] };
165
+
166
+ type Readonly<T> = { readonly [P in keyof T]: T[P] };
167
+
168
+ type Pick<T, K extends keyof T> = { [P in K]: T[P] };
169
+
170
+ type Record<K extends keyof any, T> = { [P in K]: T };
171
+
172
+ type Exclude<T, U> = T extends U ? never : T;
173
+
174
+ type Extract<T, U> = T extends U ? T : never;
175
+
176
+ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
177
+
178
+ type NonNullable<T> = T extends null | undefined ? never : T;
179
+
180
+ type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
181
+
182
+ type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
183
+
184
+ type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
185
+
186
+ type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
187
+
188
+ type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
189
+
190
+ type Uppercase<S extends string> = intrinsic;
191
+
192
+ type Lowercase<S extends string> = intrinsic;
193
+
194
+ type Capitalize<S extends string> = intrinsic;
195
+
196
+ type Uncapitalize<S extends string> = intrinsic;
197
+
198
+ const Symbol: SymbolConstructor;
199
+
200
+ const Array: ArrayConstructor;
201
+
202
+ const Promise: PromiseConstructor;
203
+ }
204
+
205
+ export {};
package/globals.d.ts ADDED
@@ -0,0 +1,333 @@
1
+ import type { int, long, double } from "@tsonic/core/types.js";
2
+
3
+ declare global {
4
+ class RangeError extends Error {
5
+ constructor(message?: string);
6
+ }
7
+
8
+ interface ArrayLike<T> {
9
+ readonly length: int;
10
+ readonly [n: number]: T;
11
+ }
12
+
13
+ interface String {
14
+ readonly length: int;
15
+ at(index: int): string;
16
+ charAt(index: int): string;
17
+ charCodeAt(index: int): int;
18
+ codePointAt(index: int): int;
19
+ concat(...strings: string[]): string;
20
+ endsWith(searchString: string): boolean;
21
+ includes(searchString: string): boolean;
22
+ indexOf(searchString: string, position?: int): int;
23
+ isWellFormed(): boolean;
24
+ lastIndexOf(searchString: string, position?: int): int;
25
+ localeCompare(compareString: string): int;
26
+ match(pattern: string): string[] | undefined;
27
+ matchAll(pattern: string): string[][];
28
+ normalize(form?: string): string;
29
+ padEnd(targetLength: int, padString?: string): string;
30
+ padStart(targetLength: int, padString?: string): string;
31
+ repeat(count: int): string;
32
+ replace(searchValue: string, replaceValue: string): string;
33
+ replaceAll(searchValue: string, replaceValue: string): string;
34
+ search(pattern: string): int;
35
+ slice(start?: int, end?: int): string;
36
+ split(separator: string, limit?: int): string[];
37
+ startsWith(searchString: string): boolean;
38
+ substr(start: int, length?: int): string;
39
+ substring(start: int, end?: int): string;
40
+ toLocaleLowerCase(): string;
41
+ toLocaleUpperCase(): string;
42
+ toLowerCase(): string;
43
+ toString(): string;
44
+ trim(): string;
45
+ trimLeft(): string;
46
+ trimRight(): string;
47
+ trimStart(): string;
48
+ trimEnd(): string;
49
+ toUpperCase(): string;
50
+ toWellFormed(): string;
51
+ valueOf(): string;
52
+ }
53
+
54
+ interface StringConstructor {
55
+ fromCharCode(...codes: int[]): string;
56
+ fromCodePoint(...codePoints: int[]): string;
57
+ }
58
+
59
+ interface Number {
60
+ toString(): string;
61
+ valueOf(): double;
62
+ }
63
+
64
+ interface NumberConstructor {
65
+ readonly EPSILON: double;
66
+ readonly MAX_SAFE_INTEGER: double;
67
+ readonly MAX_VALUE: double;
68
+ readonly MIN_SAFE_INTEGER: double;
69
+ readonly MIN_VALUE: double;
70
+ readonly NEGATIVE_INFINITY: double;
71
+ readonly POSITIVE_INFINITY: double;
72
+ readonly NaN: double;
73
+ isFinite(value: double): boolean;
74
+ isInteger(value: double): boolean;
75
+ isNaN(value: double): boolean;
76
+ isSafeInteger(value: double): boolean;
77
+ parseFloat(str: string): double;
78
+ parseInt(str: string, radix?: int): long | undefined;
79
+ }
80
+
81
+ interface Array<T> {
82
+ readonly length: int;
83
+ at(index: int): T;
84
+ concat(...items: unknown[]): T[];
85
+ copyWithin(target: int, start?: int, end?: int): T[];
86
+ entries(): Iterable<[int, T]>;
87
+ every(callback: (value: T) => boolean): boolean;
88
+ every(callback: (value: T, index: int, array: T[]) => boolean): boolean;
89
+ fill(value: T, start?: int, end?: int): T[];
90
+ filter(callback: (value: T) => boolean): T[];
91
+ filter(callback: (value: T, index: int) => boolean): T[];
92
+ filter(callback: (value: T, index: int, array: T[]) => boolean): T[];
93
+ find(callback: (value: T) => boolean): T | undefined;
94
+ find(callback: (value: T, index: int) => boolean): T | undefined;
95
+ find(callback: (value: T, index: int, array: T[]) => boolean): T | undefined;
96
+ findIndex(callback: (value: T) => boolean): int;
97
+ findIndex(callback: (value: T, index: int) => boolean): int;
98
+ findIndex(callback: (value: T, index: int, array: T[]) => boolean): int;
99
+ findLast(callback: (value: T) => boolean): T | undefined;
100
+ findLast(callback: (value: T, index: int) => boolean): T | undefined;
101
+ findLast(callback: (value: T, index: int, array: T[]) => boolean): T | undefined;
102
+ findLastIndex(callback: (value: T) => boolean): int;
103
+ findLastIndex(callback: (value: T, index: int) => boolean): int;
104
+ findLastIndex(callback: (value: T, index: int, array: T[]) => boolean): int;
105
+ flat(depth?: int): unknown[];
106
+ flatMap<TResult>(callback: (value: T, index: int, array: T[]) => unknown): TResult[];
107
+ forEach(callback: (value: T) => void): void;
108
+ forEach(callback: (value: T, index: int) => void): void;
109
+ forEach(callback: (value: T, index: int, array: T[]) => void): void;
110
+ includes(searchElement: T): boolean;
111
+ indexOf(searchElement: T, fromIndex?: int): int;
112
+ join(separator?: string): string;
113
+ keys(): Iterable<int>;
114
+ lastIndexOf(searchElement: T, fromIndex?: int): int;
115
+ map<TResult>(callback: (value: T) => TResult): TResult[];
116
+ map<TResult>(callback: (value: T, index: int) => TResult): TResult[];
117
+ map<TResult>(callback: (value: T, index: int, array: T[]) => TResult): TResult[];
118
+ pop(): T;
119
+ push(...items: T[]): int;
120
+ reduce(callback: (previousValue: T, currentValue: T) => T): T;
121
+ reduce<TResult>(callback: (previousValue: TResult, currentValue: T) => TResult, initialValue: TResult): TResult;
122
+ reduce<TResult>(callback: (previousValue: TResult, currentValue: T, index: int) => TResult, initialValue: TResult): TResult;
123
+ reduce<TResult>(callback: (
124
+ previousValue: TResult,
125
+ currentValue: T,
126
+ index: int,
127
+ array: T[]
128
+ ) => TResult, initialValue: TResult): TResult;
129
+ reduceRight<TResult>(callback: (previousValue: TResult, currentValue: T) => TResult, initialValue: TResult): TResult;
130
+ reduceRight<TResult>(callback: (previousValue: TResult, currentValue: T, index: int) => TResult, initialValue: TResult): TResult;
131
+ reduceRight<TResult>(callback: (
132
+ previousValue: TResult,
133
+ currentValue: T,
134
+ index: int,
135
+ array: T[]
136
+ ) => TResult, initialValue: TResult): TResult;
137
+ reverse(): T[];
138
+ shift(): T;
139
+ slice(start?: int, end?: int): T[];
140
+ some(callback: (value: T) => boolean): boolean;
141
+ some(callback: (value: T, index: int, array: T[]) => boolean): boolean;
142
+ sort(compareFunc?: (left: T, right: T) => double): T[];
143
+ splice(start: int, deleteCount?: int, ...items: T[]): T[];
144
+ toLocaleString(): string;
145
+ toReversed(): T[];
146
+ toSorted(compareFunc?: (left: T, right: T) => double): T[];
147
+ toSpliced(start: int, deleteCount?: int, ...items: T[]): T[];
148
+ toString(): string;
149
+ unshift(...items: T[]): int;
150
+ values(): Iterable<T>;
151
+ with(index: int, value: T): T[];
152
+ }
153
+
154
+ interface ReadonlyArray<T> {
155
+ readonly length: int;
156
+ at(index: int): T;
157
+ concat(...items: unknown[]): T[];
158
+ entries(): Iterable<[int, T]>;
159
+ every(callback: (value: T) => boolean): boolean;
160
+ every(callback: (value: T, index: int, array: readonly T[]) => boolean): boolean;
161
+ filter(callback: (value: T) => boolean): T[];
162
+ filter(callback: (value: T, index: int) => boolean): T[];
163
+ filter(callback: (value: T, index: int, array: readonly T[]) => boolean): T[];
164
+ find(callback: (value: T) => boolean): T | undefined;
165
+ find(callback: (value: T, index: int) => boolean): T | undefined;
166
+ find(callback: (value: T, index: int, array: readonly T[]) => boolean): T | undefined;
167
+ findIndex(callback: (value: T) => boolean): int;
168
+ findIndex(callback: (value: T, index: int) => boolean): int;
169
+ findIndex(callback: (value: T, index: int, array: readonly T[]) => boolean): int;
170
+ findLast(callback: (value: T) => boolean): T | undefined;
171
+ findLast(callback: (value: T, index: int) => boolean): T | undefined;
172
+ findLast(callback: (value: T, index: int, array: readonly T[]) => boolean): T | undefined;
173
+ findLastIndex(callback: (value: T) => boolean): int;
174
+ findLastIndex(callback: (value: T, index: int) => boolean): int;
175
+ findLastIndex(callback: (value: T, index: int, array: readonly T[]) => boolean): int;
176
+ flat(depth?: int): unknown[];
177
+ flatMap<TResult>(callback: (value: T, index: int, array: readonly T[]) => unknown): TResult[];
178
+ forEach(callback: (value: T) => void): void;
179
+ forEach(callback: (value: T, index: int) => void): void;
180
+ forEach(callback: (value: T, index: int, array: readonly T[]) => void): void;
181
+ includes(searchElement: T): boolean;
182
+ indexOf(searchElement: T, fromIndex?: int): int;
183
+ join(separator?: string): string;
184
+ keys(): Iterable<int>;
185
+ lastIndexOf(searchElement: T, fromIndex?: int): int;
186
+ map<TResult>(callback: (value: T) => TResult): TResult[];
187
+ map<TResult>(callback: (value: T, index: int) => TResult): TResult[];
188
+ map<TResult>(callback: (value: T, index: int, array: readonly T[]) => TResult): TResult[];
189
+ reduce(callback: (previousValue: T, currentValue: T) => T): T;
190
+ reduce<TResult>(callback: (previousValue: TResult, currentValue: T) => TResult, initialValue: TResult): TResult;
191
+ reduce<TResult>(callback: (previousValue: TResult, currentValue: T, index: int) => TResult, initialValue: TResult): TResult;
192
+ reduce<TResult>(callback: (
193
+ previousValue: TResult,
194
+ currentValue: T,
195
+ index: int,
196
+ array: readonly T[]
197
+ ) => TResult, initialValue: TResult): TResult;
198
+ reduceRight<TResult>(callback: (previousValue: TResult, currentValue: T) => TResult, initialValue: TResult): TResult;
199
+ reduceRight<TResult>(callback: (previousValue: TResult, currentValue: T, index: int) => TResult, initialValue: TResult): TResult;
200
+ reduceRight<TResult>(callback: (
201
+ previousValue: TResult,
202
+ currentValue: T,
203
+ index: int,
204
+ array: readonly T[]
205
+ ) => TResult, initialValue: TResult): TResult;
206
+ slice(start?: int, end?: int): T[];
207
+ some(callback: (value: T) => boolean): boolean;
208
+ some(callback: (value: T, index: int, array: readonly T[]) => boolean): boolean;
209
+ toLocaleString(): string;
210
+ toReversed(): T[];
211
+ toSorted(compareFunc?: (left: T, right: T) => double): T[];
212
+ toString(): string;
213
+ values(): Iterable<T>;
214
+ with(index: int, value: T): T[];
215
+ }
216
+
217
+ interface Console {
218
+ log(...data: unknown[]): void;
219
+ error(...data: unknown[]): void;
220
+ warn(...data: unknown[]): void;
221
+ info(...data: unknown[]): void;
222
+ debug(...data: unknown[]): void;
223
+ }
224
+
225
+ interface ArrayConstructor {
226
+ isArray(value: unknown): boolean;
227
+ from(source: string): string[];
228
+ from<TResult>(source: string, mapfn: (value: string, index: int) => TResult): TResult[];
229
+ from<T>(source: Iterable<T> | ArrayLike<T>): T[];
230
+ from<T, TResult>(source: Iterable<T> | ArrayLike<T>, mapfn: (value: T, index: int) => TResult): TResult[];
231
+ of<T>(...items: T[]): T[];
232
+ }
233
+
234
+ interface Date {
235
+ toISOString(): string;
236
+ getTime(): long;
237
+ }
238
+
239
+ interface DateConstructor {
240
+ new(): Date;
241
+ new(value: string | number | long): Date;
242
+ now(): long;
243
+ parse(s: string): long;
244
+ }
245
+
246
+ interface JSON {
247
+ parse<T = unknown>(text: string): T;
248
+ stringify(value: unknown, replacer?: unknown, space?: string | number | int): string;
249
+ }
250
+
251
+ interface Math {
252
+ round(x: double): double;
253
+ max(...values: double[]): double;
254
+ min(...values: double[]): double;
255
+ random(): double;
256
+ }
257
+
258
+ interface RegExpMatchArray extends Array<string> {
259
+ index?: int;
260
+ input?: string;
261
+ }
262
+
263
+ interface RegExp {
264
+ exec(string: string): RegExpMatchArray | null;
265
+ test(string: string): boolean;
266
+ }
267
+
268
+ interface RegExpConstructor {
269
+ new(pattern: string | RegExp, flags?: string): RegExp;
270
+ (pattern: string | RegExp, flags?: string): RegExp;
271
+ }
272
+
273
+ interface Map<K, V> {
274
+ readonly size: int;
275
+ clear(): void;
276
+ delete(key: K): boolean;
277
+ get(key: K): V | undefined;
278
+ has(key: K): boolean;
279
+ set(key: K, value: V): this;
280
+ }
281
+
282
+ interface MapConstructor {
283
+ new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
284
+ }
285
+
286
+ interface Set<T> {
287
+ readonly size: int;
288
+ add(value: T): this;
289
+ clear(): void;
290
+ delete(value: T): boolean;
291
+ has(value: T): boolean;
292
+ }
293
+
294
+ interface SetConstructor {
295
+ new<T = unknown>(values?: readonly T[] | null): Set<T>;
296
+ }
297
+
298
+ const String: StringConstructor;
299
+
300
+ const Number: NumberConstructor;
301
+
302
+ const console: Console;
303
+
304
+ const Date: DateConstructor;
305
+
306
+ const JSON: JSON;
307
+
308
+ const Math: Math;
309
+
310
+ const RegExp: RegExpConstructor;
311
+
312
+ const Map: MapConstructor;
313
+
314
+ const Set: SetConstructor;
315
+
316
+ function parseInt(str: string, radix?: int): long | undefined;
317
+
318
+ function parseFloat(str: string): double;
319
+
320
+ function isFinite(value: double): boolean;
321
+
322
+ function isNaN(value: double): boolean;
323
+
324
+ function setTimeout(handler: (...args: unknown[]) => void, timeout?: int, ...args: unknown[]): int;
325
+
326
+ function clearTimeout(id: int): void;
327
+
328
+ function setInterval(handler: (...args: unknown[]) => void, timeout?: int, ...args: unknown[]): int;
329
+
330
+ function clearInterval(id: int): void;
331
+ }
332
+
333
+ export {};
package/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /// <reference path="./core-globals.d.ts" />
2
+ /// <reference path="./globals.d.ts" />
3
+
1
4
  // Generated by tsbindgen - Architecture
2
5
  // Namespace: Tsonic.JSRuntime
3
6
  // Facade - Public API Surface
@@ -11,12 +14,14 @@ import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint12
11
14
  // Cross-namespace type imports for constraints
12
15
  import type { IEnumerable as IEnumerable__System_Collections_Generic, IEnumerator, KeyValuePair, List } from '@tsonic/dotnet/System.Collections.Generic.js';
13
16
  import type { IEnumerable } from '@tsonic/dotnet/System.Collections.js';
14
- import type { Action, Boolean as ClrBoolean, Byte, Comparison, Double, Func, Int16, Int32, Int64, Nullable, Object as ClrObject, SByte, Single, String as ClrString, UInt16, UInt32, ValueTuple, Void } from '@tsonic/dotnet/System.js';
17
+ import type { Action, Boolean as ClrBoolean, Byte, Comparison, Double, Exception, Func, Int16, Int32, Int64, Nullable, Object as ClrObject, SByte, Single, String as ClrString, UInt16, UInt32, ValueTuple, Void } from '@tsonic/dotnet/System.js';
18
+ import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
15
19
 
16
20
  // Public API exports (curated - no internal $instance/$views leakage)
17
21
  export { ArrayBuffer as ArrayBuffer } from './index/internal/index.js';
18
22
  export { console$instance as console } from './index/internal/index.js';
19
23
  export { Date as Date } from './index/internal/index.js';
24
+ export { Error as Error } from './index/internal/index.js';
20
25
  export { Float32Array as Float32Array } from './index/internal/index.js';
21
26
  export { Float64Array as Float64Array } from './index/internal/index.js';
22
27
  export { Globals$instance as Globals } from './index/internal/index.js';
@@ -24,10 +29,12 @@ export { Int16Array as Int16Array } from './index/internal/index.js';
24
29
  export { Int32Array as Int32Array } from './index/internal/index.js';
25
30
  export { Int8Array as Int8Array } from './index/internal/index.js';
26
31
  export { JSArray_1 as JSArray } from './index/internal/index.js';
32
+ export { JSArrayStatics$instance as JSArrayStatics } from './index/internal/index.js';
27
33
  export { JSON$instance as JSON } from './index/internal/index.js';
28
34
  export { Map_2 as Map } from './index/internal/index.js';
29
35
  export { Math$instance as Math } from './index/internal/index.js';
30
36
  export { Number$instance as Number } from './index/internal/index.js';
37
+ export { RangeError as RangeError } from './index/internal/index.js';
31
38
  export { RegExp as RegExp } from './index/internal/index.js';
32
39
  export { RegExpMatchResult as RegExpMatchResult } from './index/internal/index.js';
33
40
  export { Set_1 as Set } from './index/internal/index.js';