@girs/meta-15 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/meta-15.d.ts +37 -2
  3. package/package.json +21 -21
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/meta-15)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Meta-15 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Meta-15 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/meta-15
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 Meta from '@girs/meta-15';
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/meta-15` or `@girs/meta-15/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/meta-15'
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 Meta from 'gi://Meta?version=15';
@@ -50,7 +50,7 @@ import Meta from 'gi://Meta?version=15';
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/meta-15` or `@girs/meta-15/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/meta-15'
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 Meta = imports.gi.Meta;
@@ -77,7 +77,7 @@ const Meta = imports.gi.Meta;
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/meta-15.d.ts CHANGED
@@ -2512,6 +2512,7 @@ export namespace Meta {
2512
2512
  * instance.
2513
2513
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
2514
2514
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
2515
+ * @since 2.22
2515
2516
  */
2516
2517
  init(cancellable: Gio.Cancellable | null): boolean;
2517
2518
 
@@ -2555,6 +2556,7 @@ export namespace Meta {
2555
2556
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
2556
2557
  * instance.
2557
2558
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
2559
+ * @since 2.22
2558
2560
  * @virtual
2559
2561
  */
2560
2562
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -3755,6 +3757,7 @@ export namespace Meta {
3755
3757
  * instance.
3756
3758
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
3757
3759
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
3760
+ * @since 2.22
3758
3761
  */
3759
3762
  init(cancellable: Gio.Cancellable | null): boolean;
3760
3763
 
@@ -3798,6 +3801,7 @@ export namespace Meta {
3798
3801
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
3799
3802
  * instance.
3800
3803
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
3804
+ * @since 2.22
3801
3805
  * @virtual
3802
3806
  */
3803
3807
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -4272,26 +4276,41 @@ export namespace Meta {
4272
4276
  /**
4273
4277
  * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any.
4274
4278
  * @returns A {@link Gio.DBusObject} or `null`. The returned reference should be freed with `g_object_unref()`.
4279
+ * @since 2.32
4275
4280
  */
4276
4281
  get_object(): Gio.DBusObject | null;
4277
4282
 
4278
4283
  /**
4279
4284
  * Gets D-Bus introspection information for the D-Bus interface
4280
4285
  * implemented by `interface_`.
4286
+ *
4287
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4288
+ * construction of `interface_` and is also not made available otherwise.
4289
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4290
+ * {@link Gio.DBusInterfaceInfo}.
4281
4291
  * @returns A {@link Gio.DBusInterfaceInfo}. Do not free.
4292
+ * @since 2.30
4282
4293
  */
4283
- get_info(): Gio.DBusInterfaceInfo;
4294
+ get_info(): Gio.DBusInterfaceInfo | null;
4295
+
4296
+ /**
4297
+ * @param args
4298
+ */
4299
+ // Conflicted with Gio.DBusInterfaceSkeleton.get_info
4300
+ get_info(...args: never[]): any;
4284
4301
 
4285
4302
  /**
4286
4303
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
4287
4304
  *
4288
4305
  * Note that `interface_` will hold a weak reference to `object`.
4289
4306
  * @param object A {@link Gio.DBusObject} or `null`.
4307
+ * @since 2.30
4290
4308
  */
4291
4309
  set_object(object: Gio.DBusObject | null): void;
4292
4310
 
4293
4311
  /**
4294
4312
  * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any.
4313
+ * @since 2.32
4295
4314
  * @virtual
4296
4315
  */
4297
4316
  vfunc_dup_object(): Gio.DBusObject | null;
@@ -4299,15 +4318,29 @@ export namespace Meta {
4299
4318
  /**
4300
4319
  * Gets D-Bus introspection information for the D-Bus interface
4301
4320
  * implemented by `interface_`.
4321
+ *
4322
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4323
+ * construction of `interface_` and is also not made available otherwise.
4324
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4325
+ * {@link Gio.DBusInterfaceInfo}.
4326
+ * @since 2.30
4327
+ * @virtual
4328
+ */
4329
+ vfunc_get_info(): Gio.DBusInterfaceInfo | null;
4330
+
4331
+ /**
4332
+ * @param args
4302
4333
  * @virtual
4303
4334
  */
4304
- vfunc_get_info(): Gio.DBusInterfaceInfo;
4335
+ // Conflicted with Gio.DBusInterfaceSkeleton.vfunc_get_info
4336
+ vfunc_get_info(...args: never[]): any;
4305
4337
 
4306
4338
  /**
4307
4339
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
4308
4340
  *
4309
4341
  * Note that `interface_` will hold a weak reference to `object`.
4310
4342
  * @param object A {@link Gio.DBusObject} or `null`.
4343
+ * @since 2.30
4311
4344
  * @virtual
4312
4345
  */
4313
4346
  vfunc_set_object(object: Gio.DBusObject | null): void;
@@ -8059,6 +8092,7 @@ export namespace Meta {
8059
8092
  * instance.
8060
8093
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
8061
8094
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
8095
+ * @since 2.22
8062
8096
  */
8063
8097
  init(cancellable: Gio.Cancellable | null): boolean;
8064
8098
 
@@ -8102,6 +8136,7 @@ export namespace Meta {
8102
8136
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
8103
8137
  * instance.
8104
8138
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
8139
+ * @since 2.22
8105
8140
  * @virtual
8106
8141
  */
8107
8142
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/meta-15",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Meta-15",
5
5
  "type": "module",
6
6
  "module": "meta-15.js",
@@ -31,26 +31,26 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/xlib-2.0": "^4.2.0",
36
- "@girs/xfixes-4.0": "^4.2.0",
37
- "@girs/mtk-15": "^4.2.0",
38
- "@girs/graphene-1.0": "^4.2.0",
39
- "@girs/gobject-2.0": "^4.2.0",
40
- "@girs/glib-2.0": "^4.2.0",
41
- "@girs/gio-2.0": "^4.2.0",
42
- "@girs/gmodule-2.0": "^4.2.0",
43
- "@girs/gdesktopenums-3.0": "^4.2.0",
44
- "@girs/coglpango-15": "^4.2.0",
45
- "@girs/pangocairo-1.0": "^4.2.0",
46
- "@girs/cairo-1.0": "^4.2.0",
47
- "@girs/pango-1.0": "^4.2.0",
48
- "@girs/harfbuzz-0.0": "^4.2.0",
49
- "@girs/freetype2-2.0": "^4.2.0",
50
- "@girs/cogl-15": "^4.2.0",
51
- "@girs/gl-1.0": "^4.2.0",
52
- "@girs/clutter-15": "^4.2.0",
53
- "@girs/atk-1.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.4.0",
35
+ "@girs/xlib-2.0": "^4.4.0",
36
+ "@girs/xfixes-4.0": "^4.4.0",
37
+ "@girs/mtk-15": "^4.4.0",
38
+ "@girs/graphene-1.0": "^4.4.0",
39
+ "@girs/gobject-2.0": "^4.4.0",
40
+ "@girs/glib-2.0": "^4.4.0",
41
+ "@girs/gio-2.0": "^4.4.0",
42
+ "@girs/gmodule-2.0": "^4.4.0",
43
+ "@girs/gdesktopenums-3.0": "^4.4.0",
44
+ "@girs/coglpango-15": "^4.4.0",
45
+ "@girs/pangocairo-1.0": "^4.4.0",
46
+ "@girs/cairo-1.0": "^4.4.0",
47
+ "@girs/pango-1.0": "^4.4.0",
48
+ "@girs/harfbuzz-0.0": "^4.4.0",
49
+ "@girs/freetype2-2.0": "^4.4.0",
50
+ "@girs/cogl-15": "^4.4.0",
51
+ "@girs/gl-1.0": "^4.4.0",
52
+ "@girs/clutter-15": "^4.4.0",
53
+ "@girs/atk-1.0": "^4.4.0" },
54
54
  "devDependencies": {
55
55
  "typescript": "*"
56
56
  },