@girs/meta-17 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-17.d.ts +37 -2
  3. package/package.json +19 -19
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/meta-17)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Meta-17 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for Meta-17 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-17
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-17';
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-17` or `@girs/meta-17/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/meta-17'
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=17';
@@ -50,7 +50,7 @@ import Meta from 'gi://Meta?version=17';
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-17` or `@girs/meta-17/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/meta-17'
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-17.d.ts CHANGED
@@ -2700,6 +2700,7 @@ export namespace Meta {
2700
2700
  * instance.
2701
2701
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
2702
2702
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
2703
+ * @since 2.22
2703
2704
  */
2704
2705
  init(cancellable: Gio.Cancellable | null): boolean;
2705
2706
 
@@ -2743,6 +2744,7 @@ export namespace Meta {
2743
2744
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
2744
2745
  * instance.
2745
2746
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
2747
+ * @since 2.22
2746
2748
  * @virtual
2747
2749
  */
2748
2750
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -4062,6 +4064,7 @@ export namespace Meta {
4062
4064
  * instance.
4063
4065
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4064
4066
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
4067
+ * @since 2.22
4065
4068
  */
4066
4069
  init(cancellable: Gio.Cancellable | null): boolean;
4067
4070
 
@@ -4105,6 +4108,7 @@ export namespace Meta {
4105
4108
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
4106
4109
  * instance.
4107
4110
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
4111
+ * @since 2.22
4108
4112
  * @virtual
4109
4113
  */
4110
4114
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
@@ -4612,26 +4616,41 @@ export namespace Meta {
4612
4616
  /**
4613
4617
  * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any.
4614
4618
  * @returns A {@link Gio.DBusObject} or `null`. The returned reference should be freed with `g_object_unref()`.
4619
+ * @since 2.32
4615
4620
  */
4616
4621
  get_object(): Gio.DBusObject | null;
4617
4622
 
4618
4623
  /**
4619
4624
  * Gets D-Bus introspection information for the D-Bus interface
4620
4625
  * implemented by `interface_`.
4626
+ *
4627
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4628
+ * construction of `interface_` and is also not made available otherwise.
4629
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4630
+ * {@link Gio.DBusInterfaceInfo}.
4621
4631
  * @returns A {@link Gio.DBusInterfaceInfo}. Do not free.
4632
+ * @since 2.30
4622
4633
  */
4623
- get_info(): Gio.DBusInterfaceInfo;
4634
+ get_info(): Gio.DBusInterfaceInfo | null;
4635
+
4636
+ /**
4637
+ * @param args
4638
+ */
4639
+ // Conflicted with Gio.DBusInterfaceSkeleton.get_info
4640
+ get_info(...args: never[]): any;
4624
4641
 
4625
4642
  /**
4626
4643
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
4627
4644
  *
4628
4645
  * Note that `interface_` will hold a weak reference to `object`.
4629
4646
  * @param object A {@link Gio.DBusObject} or `null`.
4647
+ * @since 2.30
4630
4648
  */
4631
4649
  set_object(object: Gio.DBusObject | null): void;
4632
4650
 
4633
4651
  /**
4634
4652
  * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any.
4653
+ * @since 2.32
4635
4654
  * @virtual
4636
4655
  */
4637
4656
  vfunc_dup_object(): Gio.DBusObject | null;
@@ -4639,15 +4658,29 @@ export namespace Meta {
4639
4658
  /**
4640
4659
  * Gets D-Bus introspection information for the D-Bus interface
4641
4660
  * implemented by `interface_`.
4661
+ *
4662
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4663
+ * construction of `interface_` and is also not made available otherwise.
4664
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4665
+ * {@link Gio.DBusInterfaceInfo}.
4666
+ * @since 2.30
4667
+ * @virtual
4668
+ */
4669
+ vfunc_get_info(): Gio.DBusInterfaceInfo | null;
4670
+
4671
+ /**
4672
+ * @param args
4642
4673
  * @virtual
4643
4674
  */
4644
- vfunc_get_info(): Gio.DBusInterfaceInfo;
4675
+ // Conflicted with Gio.DBusInterfaceSkeleton.vfunc_get_info
4676
+ vfunc_get_info(...args: never[]): any;
4645
4677
 
4646
4678
  /**
4647
4679
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
4648
4680
  *
4649
4681
  * Note that `interface_` will hold a weak reference to `object`.
4650
4682
  * @param object A {@link Gio.DBusObject} or `null`.
4683
+ * @since 2.30
4651
4684
  * @virtual
4652
4685
  */
4653
4686
  vfunc_set_object(object: Gio.DBusObject | null): void;
@@ -8644,6 +8677,7 @@ export namespace Meta {
8644
8677
  * instance.
8645
8678
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
8646
8679
  * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
8680
+ * @since 2.22
8647
8681
  */
8648
8682
  init(cancellable: Gio.Cancellable | null): boolean;
8649
8683
 
@@ -8687,6 +8721,7 @@ export namespace Meta {
8687
8721
  * on the result of `g_object_new()`, regardless of whether it is in fact a new
8688
8722
  * instance.
8689
8723
  * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
8724
+ * @since 2.22
8690
8725
  * @virtual
8691
8726
  */
8692
8727
  vfunc_init(cancellable: Gio.Cancellable | null): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/meta-17",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "GJS TypeScript type definitions for Meta-17",
5
5
  "type": "module",
6
6
  "module": "meta-17.js",
@@ -31,24 +31,24 @@
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-17": "^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/cogl-17": "^4.2.0",
45
- "@girs/gl-1.0": "^4.2.0",
46
- "@girs/clutter-17": "^4.2.0",
47
- "@girs/pango-1.0": "^4.2.0",
48
- "@girs/cairo-1.0": "^4.2.0",
49
- "@girs/harfbuzz-0.0": "^4.2.0",
50
- "@girs/freetype2-2.0": "^4.2.0",
51
- "@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-17": "^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/cogl-17": "^4.4.0",
45
+ "@girs/gl-1.0": "^4.4.0",
46
+ "@girs/clutter-17": "^4.4.0",
47
+ "@girs/pango-1.0": "^4.4.0",
48
+ "@girs/cairo-1.0": "^4.4.0",
49
+ "@girs/harfbuzz-0.0": "^4.4.0",
50
+ "@girs/freetype2-2.0": "^4.4.0",
51
+ "@girs/atk-1.0": "^4.4.0" },
52
52
  "devDependencies": {
53
53
  "typescript": "*"
54
54
  },