@girs/javascriptcore-6.0 2.40.0-3.0.0-beta.13 → 2.40.0-3.0.0-beta.15
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 +60 -4
- package/javascriptcore-6.0-ambient.d.ts +9 -0
- package/javascriptcore-6.0-import.d.ts +13 -0
- package/javascriptcore-6.0.cjs +2 -0
- package/javascriptcore-6.0.d.cts +4 -1
- package/javascriptcore-6.0.d.ts +4 -1
- package/javascriptcore-6.0.js +2 -0
- package/package.json +5 -3
- package/tsconfig.doc.json +2 -0
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
# JavaScriptCore-6.0
|
|
3
3
|
|
|
4
|
-
GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0 using [ts-for-gir](https://github.com/gjsify/ts-for-
|
|
4
|
+
GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.0-beta.15.
|
|
5
5
|
|
|
6
6
|
WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable for projects requiring any kind of web integration, from hybrid HTML/CSS applications to full-fledged web browsers. This is the library to use to acces JavaScript from WebKitGTK.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
|
-
To use this type definitions, install them with NPM
|
|
10
|
+
To use this type definitions, install them with NPM:
|
|
11
11
|
```bash
|
|
12
12
|
npm install @girs/javascriptcore-6.0
|
|
13
13
|
```
|
|
@@ -24,10 +24,66 @@ Or if you prefer CommonJS, you can also use this:
|
|
|
24
24
|
const JavaScriptCore = require('@girs/javascriptcore-6.0');
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
### Ambient Modules
|
|
28
|
+
|
|
29
|
+
You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
|
|
30
|
+
For this you need to include `@girs/javascriptcore-6.0` or `@girs/javascriptcore-6.0/ambient` in your `tsconfig` or entry point Typescript file:
|
|
31
|
+
|
|
32
|
+
`index.ts`:
|
|
33
|
+
```ts
|
|
34
|
+
import '@girs/javascriptcore-6.0'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`tsconfig.json`:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"compilerOptions": {
|
|
41
|
+
...
|
|
42
|
+
},
|
|
43
|
+
"include": ["@girs/javascriptcore-6.0"],
|
|
44
|
+
...
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Now you can import the ambient module with TypeScript support:
|
|
28
49
|
|
|
29
50
|
```ts
|
|
30
51
|
import JavaScriptCore from 'gi://JavaScriptCore?version=6.0';
|
|
31
52
|
```
|
|
32
53
|
|
|
33
|
-
|
|
54
|
+
|
|
55
|
+
### Global import
|
|
56
|
+
|
|
57
|
+
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
|
|
58
|
+
For this you need to include `@girs/javascriptcore-6.0` or `@girs/javascriptcore-6.0/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
|
|
60
|
+
`index.ts`:
|
|
61
|
+
```ts
|
|
62
|
+
import '@girs/javascriptcore-6.0'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`tsconfig.json`:
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"compilerOptions": {
|
|
69
|
+
...
|
|
70
|
+
},
|
|
71
|
+
"include": ["@girs/javascriptcore-6.0"],
|
|
72
|
+
...
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Now you have also type support for this, too:
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
const JavaScriptCore = imports.gi.JavaScriptCore;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Bundle
|
|
83
|
+
|
|
84
|
+
Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
|
|
85
|
+
|
|
86
|
+
## Other packages
|
|
87
|
+
|
|
88
|
+
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
|
|
89
|
+
|
package/javascriptcore-6.0.d.cts
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
4
|
*
|
|
5
5
|
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
-
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
7
7
|
*/
|
|
8
|
+
|
|
9
|
+
import './javascriptcore-6.0-ambient.d.ts';
|
|
10
|
+
import './javascriptcore-6.0-import.d.ts';
|
|
8
11
|
/**
|
|
9
12
|
* JavaScriptCore-6.0
|
|
10
13
|
*/
|
package/javascriptcore-6.0.d.ts
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
4
|
*
|
|
5
5
|
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
-
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
7
7
|
*/
|
|
8
|
+
|
|
9
|
+
import './javascriptcore-6.0-ambient.d.ts';
|
|
10
|
+
import './javascriptcore-6.0-import.d.ts';
|
|
8
11
|
/**
|
|
9
12
|
* JavaScriptCore-6.0
|
|
10
13
|
*/
|
package/javascriptcore-6.0.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/javascriptcore-6.0",
|
|
3
|
-
"version": "2.40.0-3.0.0-beta.
|
|
3
|
+
"version": "2.40.0-3.0.0-beta.15",
|
|
4
4
|
"description": "GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "javascriptcore-6.0.js",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"tsconfig": "./tsconfig.doc.json"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
|
+
"./ambient": "./javascriptcore-6.0-ambient.d.ts",
|
|
16
|
+
"./import": "./javascriptcore-6.0-import.d.ts",
|
|
15
17
|
".": {
|
|
16
18
|
"import": {
|
|
17
19
|
"types": "./javascriptcore-6.0.d.ts",
|
|
@@ -29,8 +31,8 @@
|
|
|
29
31
|
"test:cjs": "tsc --noEmit javascriptcore-6.0.d.cts"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@girs/
|
|
33
|
-
"@girs/
|
|
34
|
+
"@girs/gobject-2.0": "^2.76.1-3.0.0-beta.15",
|
|
35
|
+
"@girs/glib-2.0": "^2.76.1-3.0.0-beta.15"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"typescript": "^5.0.4"
|