@girs/meta-17 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.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/meta-17.d.ts +25 -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.3.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
@@ -4618,9 +4618,20 @@ export namespace Meta {
4618
4618
  /**
4619
4619
  * Gets D-Bus introspection information for the D-Bus interface
4620
4620
  * implemented by `interface_`.
4621
+ *
4622
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4623
+ * construction of `interface_` and is also not made available otherwise.
4624
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4625
+ * {@link Gio.DBusInterfaceInfo}.
4621
4626
  * @returns A {@link Gio.DBusInterfaceInfo}. Do not free.
4622
4627
  */
4623
- get_info(): Gio.DBusInterfaceInfo;
4628
+ get_info(): Gio.DBusInterfaceInfo | null;
4629
+
4630
+ /**
4631
+ * @param args
4632
+ */
4633
+ // Conflicted with Gio.DBusInterfaceSkeleton.get_info
4634
+ get_info(...args: never[]): any;
4624
4635
 
4625
4636
  /**
4626
4637
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
@@ -4639,9 +4650,21 @@ export namespace Meta {
4639
4650
  /**
4640
4651
  * Gets D-Bus introspection information for the D-Bus interface
4641
4652
  * implemented by `interface_`.
4653
+ *
4654
+ * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during
4655
+ * construction of `interface_` and is also not made available otherwise.
4656
+ * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null`
4657
+ * {@link Gio.DBusInterfaceInfo}.
4658
+ * @virtual
4659
+ */
4660
+ vfunc_get_info(): Gio.DBusInterfaceInfo | null;
4661
+
4662
+ /**
4663
+ * @param args
4642
4664
  * @virtual
4643
4665
  */
4644
- vfunc_get_info(): Gio.DBusInterfaceInfo;
4666
+ // Conflicted with Gio.DBusInterfaceSkeleton.vfunc_get_info
4667
+ vfunc_get_info(...args: never[]): any;
4645
4668
 
4646
4669
  /**
4647
4670
  * Sets the {@link Gio.DBusObject} for `interface_` to `object`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/meta-17",
3
- "version": "4.2.0",
3
+ "version": "4.3.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.3.0",
35
+ "@girs/xlib-2.0": "^4.3.0",
36
+ "@girs/xfixes-4.0": "^4.3.0",
37
+ "@girs/mtk-17": "^4.3.0",
38
+ "@girs/graphene-1.0": "^4.3.0",
39
+ "@girs/gobject-2.0": "^4.3.0",
40
+ "@girs/glib-2.0": "^4.3.0",
41
+ "@girs/gio-2.0": "^4.3.0",
42
+ "@girs/gmodule-2.0": "^4.3.0",
43
+ "@girs/gdesktopenums-3.0": "^4.3.0",
44
+ "@girs/cogl-17": "^4.3.0",
45
+ "@girs/gl-1.0": "^4.3.0",
46
+ "@girs/clutter-17": "^4.3.0",
47
+ "@girs/pango-1.0": "^4.3.0",
48
+ "@girs/cairo-1.0": "^4.3.0",
49
+ "@girs/harfbuzz-0.0": "^4.3.0",
50
+ "@girs/freetype2-2.0": "^4.3.0",
51
+ "@girs/atk-1.0": "^4.3.0" },
52
52
  "devDependencies": {
53
53
  "typescript": "*"
54
54
  },