@girs/gcr-3 4.2.0 → 4.4.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.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/gcr-3.d.ts +9 -0
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gcr-3)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Gcr-3, generated from library version 3.41.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Gcr-3, generated from library version 3.41.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
9
9
 
10
10
  ## Install
11
11
 
12
- To use this type definitions, install them with NPM:
12
+ Install the type definitions with npm:
13
13
  ```bash
14
14
  npm install @girs/gcr-3
15
15
  ```
16
16
 
17
17
  ## Usage
18
18
 
19
- You can import this package into your project like this:
19
+ Import it like any other module:
20
20
  ```ts
21
21
  import Gcr from '@girs/gcr-3';
22
22
  ```
23
23
 
24
24
  ### Ambient Modules
25
25
 
26
- 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.
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/gcr-3` or `@girs/gcr-3/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/gcr-3'
42
42
  }
43
43
  ```
44
44
 
45
- Now you can import the ambient module with TypeScript support:
45
+ The ambient module now resolves with types:
46
46
 
47
47
  ```ts
48
48
  import Gcr from 'gi://Gcr?version=3';
@@ -50,7 +50,7 @@ import Gcr from 'gi://Gcr?version=3';
50
50
 
51
51
  ### Global import
52
52
 
53
- You can also import the module with Typescript support using the global `imports.gi` object of GJS.
53
+ GJS's global `imports.gi` works too, with types.
54
54
  For this you need to include `@girs/gcr-3` or `@girs/gcr-3/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/gcr-3'
69
69
  }
70
70
  ```
71
71
 
72
- Now you have also type support for this, too:
72
+ That form carries types as well:
73
73
 
74
74
  ```ts
75
75
  const Gcr = imports.gi.Gcr;
@@ -77,7 +77,7 @@ const Gcr = imports.gi.Gcr;
77
77
 
78
78
  ### Bundle
79
79
 
80
- 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).
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/gcr-3.d.ts CHANGED
@@ -3945,6 +3945,7 @@ export namespace Gcr {
3945
3945
  * any interface methods.
3946
3946
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
3947
3947
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
3948
+ * @since 2.22
3948
3949
  */
3949
3950
  init_async(io_priority: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
3950
3951
 
@@ -3988,6 +3989,7 @@ export namespace Gcr {
3988
3989
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
3989
3990
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
3990
3991
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
3992
+ * @since 2.22
3991
3993
  */
3992
3994
  init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
3993
3995
 
@@ -4031,6 +4033,7 @@ export namespace Gcr {
4031
4033
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
4032
4034
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4033
4035
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
4036
+ * @since 2.22
4034
4037
  */
4035
4038
  init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
4036
4039
 
@@ -4039,6 +4042,7 @@ export namespace Gcr {
4039
4042
  * See `g_async_initable_init_async()`.
4040
4043
  * @param res a {@link Gio.AsyncResult}.
4041
4044
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
4045
+ * @since 2.22
4042
4046
  */
4043
4047
  init_finish(res: Gio.AsyncResult): boolean;
4044
4048
 
@@ -4047,6 +4051,7 @@ export namespace Gcr {
4047
4051
  * calls, returning the created object or `null` on error.
4048
4052
  * @param res the {@link Gio.AsyncResult} from the callback
4049
4053
  * @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
4054
+ * @since 2.22
4050
4055
  */
4051
4056
  new_finish(res: Gio.AsyncResult): SystemPrompt;
4052
4057
 
@@ -4090,6 +4095,7 @@ export namespace Gcr {
4090
4095
  * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
4091
4096
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4092
4097
  * @param callback a {@link Gio.AsyncReadyCallback} to call when the request is satisfied
4098
+ * @since 2.22
4093
4099
  * @virtual
4094
4100
  */
4095
4101
  vfunc_init_async(io_priority: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
@@ -4098,6 +4104,7 @@ export namespace Gcr {
4098
4104
  * Finishes asynchronous initialization and returns the result.
4099
4105
  * See `g_async_initable_init_async()`.
4100
4106
  * @param res a {@link Gio.AsyncResult}.
4107
+ * @since 2.22
4101
4108
  * @virtual
4102
4109
  */
4103
4110
  vfunc_init_finish(res: Gio.AsyncResult): boolean;
@@ -4143,6 +4150,7 @@ export namespace Gcr {
4143
4150
  * instance.
4144
4151
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4145
4152
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
4153
+ * @since 2.22
4146
4154
  */
4147
4155
  init(cancellable: Gio.Cancellable | null): boolean;
4148
4156
 
@@ -4186,6 +4194,7 @@ export namespace Gcr {
4186
4194
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
4187
4195
  * instance.
4188
4196
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4197
+ * @since 2.22
4189
4198
  * @virtual
4190
4199
  */
4191
4200
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gcr-3",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "libraryVersion": "3.41.2",
5
5
  "description": "GJS TypeScript type definitions for Gcr-3, generated from library version 3.41.2",
6
6
  "type": "module",
@@ -32,12 +32,12 @@
32
32
  "test": "tsc --project tsconfig.json"
33
33
  },
34
34
  "dependencies": {
35
- "@girs/gjs": "^4.2.0",
36
- "@girs/gio-2.0": "^4.2.0",
37
- "@girs/gobject-2.0": "^4.2.0",
38
- "@girs/glib-2.0": "^4.2.0",
39
- "@girs/gmodule-2.0": "^4.2.0",
40
- "@girs/gck-1": "^4.2.0" },
35
+ "@girs/gjs": "^4.4.0",
36
+ "@girs/gio-2.0": "^4.4.0",
37
+ "@girs/gobject-2.0": "^4.4.0",
38
+ "@girs/glib-2.0": "^4.4.0",
39
+ "@girs/gmodule-2.0": "^4.4.0",
40
+ "@girs/gck-1": "^4.4.0" },
41
41
  "devDependencies": {
42
42
  "typescript": "*"
43
43
  },