@tsonic/js 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.
@@ -55,6 +55,7 @@ interface __TsonicExtMethods_Tsonic_JSRuntime {
55
55
  toLocaleLowerCase(this: string): Rewrap<this, string>;
56
56
  toLocaleUpperCase(this: string): Rewrap<this, string>;
57
57
  toLowerCase(this: string): Rewrap<this, string>;
58
+ toString(this: double): Rewrap<this, string>;
58
59
  toString(this: string): Rewrap<this, string>;
59
60
  toUpperCase(this: string): Rewrap<this, string>;
60
61
  toWellFormed(this: string): Rewrap<this, string>;
@@ -63,6 +64,7 @@ interface __TsonicExtMethods_Tsonic_JSRuntime {
63
64
  trimLeft(this: string): Rewrap<this, string>;
64
65
  trimRight(this: string): Rewrap<this, string>;
65
66
  trimStart(this: string): Rewrap<this, string>;
67
+ valueOf(this: double): Rewrap<this, double>;
66
68
  valueOf(this: string): Rewrap<this, string>;
67
69
  }
68
70
 
package/bindings.json CHANGED
@@ -8,22 +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"
25
+ },
26
+ "Number": {
27
+ "kind": "global",
28
+ "assembly": "Tsonic.JSRuntime",
29
+ "type": "Tsonic.JSRuntime.Number",
30
+ "staticType": "Tsonic.JSRuntime.Number"
22
31
  },
23
32
  "RegExp": {
24
33
  "kind": "global",
25
34
  "assembly": "Tsonic.JSRuntime",
26
- "type": "Tsonic.JSRuntime.RegExp"
35
+ "type": "Tsonic.JSRuntime.RegExp",
36
+ "staticType": "Tsonic.JSRuntime.RegExp"
27
37
  },
28
38
  "Map": {
29
39
  "kind": "global",
@@ -37,10 +47,23 @@
37
47
  "type": "Tsonic.JSRuntime.Set`1",
38
48
  "csharpName": "Set"
39
49
  },
50
+ "Object": {
51
+ "kind": "global",
52
+ "assembly": "Tsonic.JSRuntime",
53
+ "type": "Tsonic.JSRuntime.Object",
54
+ "staticType": "Tsonic.JSRuntime.Object"
55
+ },
56
+ "String": {
57
+ "kind": "global",
58
+ "assembly": "Tsonic.JSRuntime",
59
+ "type": "Tsonic.JSRuntime.String",
60
+ "staticType": "Tsonic.JSRuntime.String"
61
+ },
40
62
  "Array": {
41
63
  "kind": "global",
42
64
  "assembly": "Tsonic.JSRuntime",
43
65
  "type": "Tsonic.JSRuntime.JSArray`1",
66
+ "staticType": "Tsonic.JSRuntime.JSArrayStatics",
44
67
  "csharpName": "JSArray"
45
68
  },
46
69
  "ReadonlyArray": {
@@ -72,6 +95,40 @@
72
95
  "assembly": "Tsonic.JSRuntime",
73
96
  "type": "Tsonic.JSRuntime.Globals",
74
97
  "csharpName": "Globals.isNaN"
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
+ },
123
+ "RangeError": {
124
+ "kind": "global",
125
+ "assembly": "Tsonic.JSRuntime",
126
+ "type": "Tsonic.JSRuntime.RangeError"
127
+ },
128
+ "Error": {
129
+ "kind": "global",
130
+ "assembly": "Tsonic.JSRuntime",
131
+ "type": "Tsonic.JSRuntime.Error"
75
132
  }
76
133
  }
77
134
  }
@@ -0,0 +1,206 @@
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
+ readonly [n: number]: string;
30
+ }
31
+
32
+ interface Number {
33
+ }
34
+
35
+ interface Boolean {
36
+ }
37
+
38
+ interface Object {
39
+ constructor: Function;
40
+ }
41
+
42
+ interface SymbolConstructor {
43
+ readonly iterator: symbol;
44
+ readonly asyncIterator: symbol;
45
+ readonly hasInstance: symbol;
46
+ readonly isConcatSpreadable: symbol;
47
+ readonly species: symbol;
48
+ readonly toPrimitive: symbol;
49
+ readonly toStringTag: symbol;
50
+ }
51
+
52
+ interface Array<T> {
53
+ [n: number]: T;
54
+ readonly length: number;
55
+ [Symbol.iterator](): IterableIterator<T>;
56
+ }
57
+
58
+ interface ReadonlyArray<T> {
59
+ readonly [n: number]: T;
60
+ readonly length: number;
61
+ [Symbol.iterator](): IterableIterator<T>;
62
+ }
63
+
64
+ interface ArrayConstructor {
65
+ new<T>(size?: number): T[];
66
+ }
67
+
68
+ interface Promise<T> {
69
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: | ((value: T) => TResult1 | PromiseLike<TResult1>)
70
+ | undefined
71
+ | null, onrejected?: | ((reason: any) => TResult2 | PromiseLike<TResult2>)
72
+ | undefined
73
+ | null): Promise<TResult1 | TResult2>;
74
+ catch<TResult = never>(onrejected?: | ((reason: any) => TResult | PromiseLike<TResult>)
75
+ | undefined
76
+ | null): Promise<T | TResult>;
77
+ finally(onfinally?: (() => void) | undefined | null): Promise<T>;
78
+ }
79
+
80
+ interface PromiseLike<T> {
81
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: | ((value: T) => TResult1 | PromiseLike<TResult1>)
82
+ | undefined
83
+ | null, onrejected?: | ((reason: any) => TResult2 | PromiseLike<TResult2>)
84
+ | undefined
85
+ | null): PromiseLike<TResult1 | TResult2>;
86
+ }
87
+
88
+ interface PromiseConstructor {
89
+ new<T>(executor: (
90
+ resolve: (value: T | PromiseLike<T>) => void,
91
+ reject: (reason?: any) => void
92
+ ) => void): Promise<T>;
93
+ resolve(): Promise<void>;
94
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
95
+ reject<T = never>(reason?: any): Promise<T>;
96
+ all<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
97
+ race<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T>;
98
+ }
99
+
100
+ interface Iterator<T, TReturn = any, TNext = undefined> {
101
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
102
+ return(value?: TReturn): IteratorResult<T, TReturn>;
103
+ throw(e?: any): IteratorResult<T, TReturn>;
104
+ }
105
+
106
+ interface IteratorResult<T, TReturn = any> {
107
+ done: boolean;
108
+ value: T | TReturn;
109
+ }
110
+
111
+ interface IteratorYieldResult<T> {
112
+ done: false;
113
+ value: T;
114
+ }
115
+
116
+ interface IteratorReturnResult<TReturn> {
117
+ done: true;
118
+ value: TReturn;
119
+ }
120
+
121
+ interface Iterable<T, TReturn = any, TNext = undefined> {
122
+ [Symbol.iterator](): Iterator<T, TReturn, TNext>;
123
+ }
124
+
125
+ interface IterableIterator<T, TReturn = any, TNext = undefined> extends Iterator<T, TReturn, TNext> {
126
+ [Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
127
+ }
128
+
129
+ interface AsyncIterator<T, TReturn = any, TNext = undefined> {
130
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
131
+ return(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
132
+ throw(e?: any): Promise<IteratorResult<T, TReturn>>;
133
+ }
134
+
135
+ interface AsyncIterable<T, TReturn = any, TNext = undefined> {
136
+ [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
137
+ }
138
+
139
+ interface AsyncIterableIterator<T, TReturn = any, TNext = undefined> extends AsyncIterator<T, TReturn, TNext> {
140
+ [Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
141
+ }
142
+
143
+ interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {
144
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
145
+ return(value: TReturn): IteratorResult<T, TReturn>;
146
+ throw(e: any): IteratorResult<T, TReturn>;
147
+ [Symbol.iterator](): Generator<T, TReturn, TNext>;
148
+ }
149
+
150
+ interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
151
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
152
+ return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
153
+ throw(e: any): Promise<IteratorResult<T, TReturn>>;
154
+ [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
155
+ }
156
+
157
+ interface TemplateStringsArray extends ReadonlyArray<string> {
158
+ readonly raw: readonly string[];
159
+ }
160
+
161
+ type PropertyKey = string | number | symbol;
162
+
163
+ type Partial<T> = { [P in keyof T]?: T[P] };
164
+
165
+ type Required<T> = { [P in keyof T]-?: T[P] };
166
+
167
+ type Readonly<T> = { readonly [P in keyof T]: T[P] };
168
+
169
+ type Pick<T, K extends keyof T> = { [P in K]: T[P] };
170
+
171
+ type Record<K extends keyof any, T> = { [P in K]: T };
172
+
173
+ type Exclude<T, U> = T extends U ? never : T;
174
+
175
+ type Extract<T, U> = T extends U ? T : never;
176
+
177
+ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
178
+
179
+ type NonNullable<T> = T extends null | undefined ? never : T;
180
+
181
+ type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
182
+
183
+ type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
184
+
185
+ type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
186
+
187
+ type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
188
+
189
+ type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
190
+
191
+ type Uppercase<S extends string> = intrinsic;
192
+
193
+ type Lowercase<S extends string> = intrinsic;
194
+
195
+ type Capitalize<S extends string> = intrinsic;
196
+
197
+ type Uncapitalize<S extends string> = intrinsic;
198
+
199
+ const Symbol: SymbolConstructor;
200
+
201
+ const Array: ArrayConstructor;
202
+
203
+ const Promise: PromiseConstructor;
204
+ }
205
+
206
+ export {};