@tsonic/js 10.0.44 → 10.0.46
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 +7 -5
- package/__internal/extensions/index.d.ts +2 -0
- package/bindings.json +9 -0
- package/core-globals.d.ts +0 -6
- package/globals.d.ts +18 -1
- package/index/bindings.json +548 -480
- package/index/internal/index.d.ts +8 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/tsonic.bindings.json +1 -1
package/README.md
CHANGED
|
@@ -15,8 +15,7 @@ This package is part of Tsonic: https://tsonic.org.
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
mkdir my-app && cd my-app
|
|
18
|
-
npx --yes tsonic@latest init --surface js
|
|
19
|
-
npx --yes tsonic@latest add npm @tsonic/js
|
|
18
|
+
npx --yes tsonic@latest init --surface @tsonic/js
|
|
20
19
|
```
|
|
21
20
|
|
|
22
21
|
```ts
|
|
@@ -38,10 +37,13 @@ npm run dev
|
|
|
38
37
|
npx --yes tsonic@latest add npm @tsonic/js
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
If the workspace is not already JS surface, set
|
|
40
|
+
If the workspace is not already JS surface, set `surface` in
|
|
41
|
+
`tsonic.workspace.json` to `@tsonic/js`:
|
|
42
42
|
|
|
43
|
-
```
|
|
44
|
-
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"surface": "@tsonic/js"
|
|
46
|
+
}
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
## Optional direct imports
|
|
@@ -54,6 +54,7 @@ interface __TsonicExtMethods_Tsonic_JSRuntime {
|
|
|
54
54
|
toLocaleLowerCase(this: string): Rewrap<this, string>;
|
|
55
55
|
toLocaleUpperCase(this: string): Rewrap<this, string>;
|
|
56
56
|
toLowerCase(this: string): Rewrap<this, string>;
|
|
57
|
+
toString(this: boolean): Rewrap<this, string>;
|
|
57
58
|
toString(this: double): Rewrap<this, string>;
|
|
58
59
|
toString(this: int): Rewrap<this, string>;
|
|
59
60
|
toString(this: long): Rewrap<this, string>;
|
|
@@ -68,6 +69,7 @@ interface __TsonicExtMethods_Tsonic_JSRuntime {
|
|
|
68
69
|
trimLeft(this: string): Rewrap<this, string>;
|
|
69
70
|
trimRight(this: string): Rewrap<this, string>;
|
|
70
71
|
trimStart(this: string): Rewrap<this, string>;
|
|
72
|
+
valueOf(this: boolean): Rewrap<this, boolean>;
|
|
71
73
|
valueOf(this: double): Rewrap<this, double>;
|
|
72
74
|
valueOf(this: int): Rewrap<this, int>;
|
|
73
75
|
valueOf(this: long): Rewrap<this, long>;
|
package/bindings.json
CHANGED
|
@@ -50,6 +50,15 @@
|
|
|
50
50
|
"contributesTypeIdentity": true
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
+
"Boolean": {
|
|
54
|
+
"kind": "global",
|
|
55
|
+
"assembly": "Tsonic.JSRuntime",
|
|
56
|
+
"type": "Tsonic.JSRuntime.BooleanOps",
|
|
57
|
+
"csharpName": "Globals.Boolean",
|
|
58
|
+
"typeSemantics": {
|
|
59
|
+
"contributesTypeIdentity": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
53
62
|
"RegExp": {
|
|
54
63
|
"kind": "global",
|
|
55
64
|
"assembly": "Tsonic.JSRuntime",
|
package/core-globals.d.ts
CHANGED
|
@@ -22,9 +22,6 @@ declare global {
|
|
|
22
22
|
interface RegExp {
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
interface ImportMeta {
|
|
26
|
-
}
|
|
27
|
-
|
|
28
25
|
interface String {
|
|
29
26
|
readonly [n: number]: string;
|
|
30
27
|
}
|
|
@@ -32,9 +29,6 @@ declare global {
|
|
|
32
29
|
interface Number {
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
interface Boolean {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
32
|
interface Object {
|
|
39
33
|
constructor: Function;
|
|
40
34
|
}
|
package/globals.d.ts
CHANGED
|
@@ -62,6 +62,21 @@ declare global {
|
|
|
62
62
|
valueOf(): number;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
interface Boolean {
|
|
66
|
+
toString(): string;
|
|
67
|
+
valueOf(): boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface BooleanConstructor {
|
|
71
|
+
(value?: unknown): boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ImportMeta {
|
|
75
|
+
readonly url: string;
|
|
76
|
+
readonly filename: string;
|
|
77
|
+
readonly dirname: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
65
80
|
interface NumberConstructor {
|
|
66
81
|
readonly EPSILON: number;
|
|
67
82
|
readonly MAX_SAFE_INTEGER: number;
|
|
@@ -242,7 +257,7 @@ declare global {
|
|
|
242
257
|
new(): Date;
|
|
243
258
|
new(value: string | number | long): Date;
|
|
244
259
|
now(): long;
|
|
245
|
-
parse(s: string):
|
|
260
|
+
parse(s: string): number;
|
|
246
261
|
}
|
|
247
262
|
|
|
248
263
|
interface Uint8ArrayConstructor {
|
|
@@ -326,6 +341,8 @@ declare global {
|
|
|
326
341
|
|
|
327
342
|
const Number: NumberConstructor;
|
|
328
343
|
|
|
344
|
+
const Boolean: BooleanConstructor;
|
|
345
|
+
|
|
329
346
|
const console: Console;
|
|
330
347
|
|
|
331
348
|
const Date: DateConstructor;
|