@girs/gstinterfaces-0.10 4.2.0 → 4.3.0
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 +8 -8
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GstInterfaces-0.10 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for GstInterfaces-0.10 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.3.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/gstinterfaces-0.10
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import GstInterfaces from '@girs/gstinterfaces-0.10';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
27
|
For this you need to include `@girs/gstinterfaces-0.10` or `@girs/gstinterfaces-0.10/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/gstinterfaces-0.10'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import GstInterfaces from 'gi://GstInterfaces?version=0.10';
|
|
@@ -50,7 +50,7 @@ import GstInterfaces from 'gi://GstInterfaces?version=0.10';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/gstinterfaces-0.10` or `@girs/gstinterfaces-0.10/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/gstinterfaces-0.10'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const GstInterfaces = imports.gi.GstInterfaces;
|
|
@@ -77,7 +77,7 @@ const GstInterfaces = imports.gi.GstInterfaces;
|
|
|
77
77
|
|
|
78
78
|
### Bundle
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
81
81
|
|
|
82
82
|
## Other packages
|
|
83
83
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gstinterfaces-0.10",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GstInterfaces-0.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gstinterfaces-0.10.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/libxml2-2.0": "^4.
|
|
36
|
-
"@girs/gst-0.10": "^4.
|
|
37
|
-
"@girs/gobject-2.0": "^4.
|
|
38
|
-
"@girs/glib-2.0": "^4.
|
|
39
|
-
"@girs/gmodule-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.3.0",
|
|
35
|
+
"@girs/libxml2-2.0": "^4.3.0",
|
|
36
|
+
"@girs/gst-0.10": "^4.3.0",
|
|
37
|
+
"@girs/gobject-2.0": "^4.3.0",
|
|
38
|
+
"@girs/glib-2.0": "^4.3.0",
|
|
39
|
+
"@girs/gmodule-2.0": "^4.3.0" },
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "*"
|
|
42
42
|
},
|