@girs/peas-2 2.0.0-4.0.0-beta.23 → 2.0.0-4.0.0-beta.24

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 +1 -1
  2. package/package.json +6 -6
  3. package/peas-2.d.ts +176 -49
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/peas-2)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Peas-2, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.23.
8
+ GJS TypeScript type definitions for Peas-2, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.24.
9
9
 
10
10
 
11
11
  ## Install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/peas-2",
3
- "version": "2.0.0-4.0.0-beta.23",
3
+ "version": "2.0.0-4.0.0-beta.24",
4
4
  "description": "GJS TypeScript type definitions for Peas-2, generated from library version 2.0.0",
5
5
  "type": "module",
6
6
  "module": "peas-2.js",
@@ -31,11 +31,11 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gio-2.0": "^2.84.0-4.0.0-beta.23",
35
- "@girs/gjs": "^4.0.0-beta.23",
36
- "@girs/glib-2.0": "^2.84.0-4.0.0-beta.23",
37
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.23",
38
- "@girs/gobject-2.0": "^2.84.0-4.0.0-beta.23"
34
+ "@girs/gio-2.0": "^2.84.2-4.0.0-beta.24",
35
+ "@girs/gjs": "^4.0.0-beta.24",
36
+ "@girs/glib-2.0": "^2.84.2-4.0.0-beta.24",
37
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.24",
38
+ "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24"
39
39
  },
40
40
  "devDependencies": {
41
41
  "typescript": "*"
package/peas-2.d.ts CHANGED
@@ -58,14 +58,12 @@ export namespace Peas {
58
58
  (parameters: GObject.Parameter[]): GObject.Object;
59
59
  }
60
60
  namespace Engine {
61
- // Signal callback interfaces
62
-
63
- interface LoadPlugin {
64
- (info: PluginInfo): void;
65
- }
66
-
67
- interface UnloadPlugin {
68
- (info: PluginInfo): void;
61
+ // Signal signatures
62
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
63
+ 'load-plugin': (arg0: PluginInfo) => void;
64
+ 'unload-plugin': (arg0: PluginInfo) => void;
65
+ 'notify::loaded-plugins': (pspec: GObject.ParamSpec) => void;
66
+ 'notify::nonglobal-loaders': (pspec: GObject.ParamSpec) => void;
69
67
  }
70
68
 
71
69
  // Constructor properties interface
@@ -150,6 +148,15 @@ export namespace Peas {
150
148
  */
151
149
  get nonglobalLoaders(): boolean;
152
150
 
151
+ /**
152
+ * Compile-time signal type information.
153
+ *
154
+ * This instance property is generated only for TypeScript type checking.
155
+ * It is not defined at runtime and should not be accessed in JS code.
156
+ * @internal
157
+ */
158
+ $signals: Engine.SignalSignatures;
159
+
153
160
  // Constructors
154
161
 
155
162
  constructor(properties?: Partial<Engine.ConstructorProps>, ...args: any[]);
@@ -162,15 +169,21 @@ export namespace Peas {
162
169
 
163
170
  // Signals
164
171
 
165
- connect(id: string, callback: (...args: any[]) => any): number;
166
- connect_after(id: string, callback: (...args: any[]) => any): number;
167
- emit(id: string, ...args: any[]): void;
168
- connect(signal: 'load-plugin', callback: (_source: this, info: PluginInfo) => void): number;
169
- connect_after(signal: 'load-plugin', callback: (_source: this, info: PluginInfo) => void): number;
170
- emit(signal: 'load-plugin', info: PluginInfo): void;
171
- connect(signal: 'unload-plugin', callback: (_source: this, info: PluginInfo) => void): number;
172
- connect_after(signal: 'unload-plugin', callback: (_source: this, info: PluginInfo) => void): number;
173
- emit(signal: 'unload-plugin', info: PluginInfo): void;
172
+ connect<K extends keyof Engine.SignalSignatures>(
173
+ signal: K,
174
+ callback: GObject.SignalCallback<this, Engine.SignalSignatures[K]>,
175
+ ): number;
176
+ connect(signal: string, callback: (...args: any[]) => any): number;
177
+ connect_after<K extends keyof Engine.SignalSignatures>(
178
+ signal: K,
179
+ callback: GObject.SignalCallback<this, Engine.SignalSignatures[K]>,
180
+ ): number;
181
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
182
+ emit<K extends keyof Engine.SignalSignatures>(
183
+ signal: K,
184
+ ...args: GObject.GjsParameters<Engine.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
185
+ ): void;
186
+ emit(signal: string, ...args: any[]): void;
174
187
 
175
188
  // Static methods
176
189
 
@@ -239,11 +252,9 @@ export namespace Peas {
239
252
  * Enable a loader, enables a loader for plugins.
240
253
  *
241
254
  * The C plugin loader is always enabled. The other plugin
242
- * loaders are: "gjs", "lua5.1", and "python".
255
+ * loaders are: gjs, lua5.1, python and python3.
243
256
  *
244
- * Note that the "python" loader is Python 3 only.
245
- *
246
- * For instance, the following code will enable Python 3 plugins
257
+ * For instance, the following code will enable Python 2 plugins
247
258
  * to be loaded:
248
259
  *
249
260
  * ```c
@@ -857,6 +868,12 @@ export namespace Peas {
857
868
  }
858
869
 
859
870
  namespace ExtensionBase {
871
+ // Signal signatures
872
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
873
+ 'notify::data-dir': (pspec: GObject.ParamSpec) => void;
874
+ 'notify::plugin-info': (pspec: GObject.ParamSpec) => void;
875
+ }
876
+
860
877
  // Constructor properties interface
861
878
 
862
879
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -909,12 +926,39 @@ export namespace Peas {
909
926
  */
910
927
  get pluginInfo(): PluginInfo;
911
928
 
929
+ /**
930
+ * Compile-time signal type information.
931
+ *
932
+ * This instance property is generated only for TypeScript type checking.
933
+ * It is not defined at runtime and should not be accessed in JS code.
934
+ * @internal
935
+ */
936
+ $signals: ExtensionBase.SignalSignatures;
937
+
912
938
  // Constructors
913
939
 
914
940
  constructor(properties?: Partial<ExtensionBase.ConstructorProps>, ...args: any[]);
915
941
 
916
942
  _init(...args: any[]): void;
917
943
 
944
+ // Signals
945
+
946
+ connect<K extends keyof ExtensionBase.SignalSignatures>(
947
+ signal: K,
948
+ callback: GObject.SignalCallback<this, ExtensionBase.SignalSignatures[K]>,
949
+ ): number;
950
+ connect(signal: string, callback: (...args: any[]) => any): number;
951
+ connect_after<K extends keyof ExtensionBase.SignalSignatures>(
952
+ signal: K,
953
+ callback: GObject.SignalCallback<this, ExtensionBase.SignalSignatures[K]>,
954
+ ): number;
955
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
956
+ emit<K extends keyof ExtensionBase.SignalSignatures>(
957
+ signal: K,
958
+ ...args: GObject.GjsParameters<ExtensionBase.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
959
+ ): void;
960
+ emit(signal: string, ...args: any[]): void;
961
+
918
962
  // Methods
919
963
 
920
964
  /**
@@ -931,14 +975,13 @@ export namespace Peas {
931
975
  }
932
976
 
933
977
  namespace ExtensionSet {
934
- // Signal callback interfaces
935
-
936
- interface ExtensionAdded {
937
- (info: PluginInfo, extension: GObject.Object): void;
938
- }
939
-
940
- interface ExtensionRemoved {
941
- (info: PluginInfo, extension: GObject.Object): void;
978
+ // Signal signatures
979
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
980
+ 'extension-added': (arg0: PluginInfo, arg1: GObject.Object) => void;
981
+ 'extension-removed': (arg0: PluginInfo, arg1: GObject.Object) => void;
982
+ 'notify::construct-properties': (pspec: GObject.ParamSpec) => void;
983
+ 'notify::engine': (pspec: GObject.ParamSpec) => void;
984
+ 'notify::extension-type': (pspec: GObject.ParamSpec) => void;
942
985
  }
943
986
 
944
987
  // Constructor properties interface
@@ -1018,6 +1061,15 @@ export namespace Peas {
1018
1061
  get extension_type(): GObject.GType;
1019
1062
  get extensionType(): GObject.GType;
1020
1063
 
1064
+ /**
1065
+ * Compile-time signal type information.
1066
+ *
1067
+ * This instance property is generated only for TypeScript type checking.
1068
+ * It is not defined at runtime and should not be accessed in JS code.
1069
+ * @internal
1070
+ */
1071
+ $signals: ExtensionSet.SignalSignatures;
1072
+
1021
1073
  // Constructors
1022
1074
 
1023
1075
  constructor(properties?: Partial<ExtensionSet.ConstructorProps>, ...args: any[]);
@@ -1033,27 +1085,21 @@ export namespace Peas {
1033
1085
 
1034
1086
  // Signals
1035
1087
 
1036
- connect(id: string, callback: (...args: any[]) => any): number;
1037
- connect_after(id: string, callback: (...args: any[]) => any): number;
1038
- emit(id: string, ...args: any[]): void;
1039
- connect(
1040
- signal: 'extension-added',
1041
- callback: (_source: this, info: PluginInfo, extension: GObject.Object) => void,
1042
- ): number;
1043
- connect_after(
1044
- signal: 'extension-added',
1045
- callback: (_source: this, info: PluginInfo, extension: GObject.Object) => void,
1088
+ connect<K extends keyof ExtensionSet.SignalSignatures>(
1089
+ signal: K,
1090
+ callback: GObject.SignalCallback<this, ExtensionSet.SignalSignatures[K]>,
1046
1091
  ): number;
1047
- emit(signal: 'extension-added', info: PluginInfo, extension: GObject.Object): void;
1048
- connect(
1049
- signal: 'extension-removed',
1050
- callback: (_source: this, info: PluginInfo, extension: GObject.Object) => void,
1092
+ connect(signal: string, callback: (...args: any[]) => any): number;
1093
+ connect_after<K extends keyof ExtensionSet.SignalSignatures>(
1094
+ signal: K,
1095
+ callback: GObject.SignalCallback<this, ExtensionSet.SignalSignatures[K]>,
1051
1096
  ): number;
1052
- connect_after(
1053
- signal: 'extension-removed',
1054
- callback: (_source: this, info: PluginInfo, extension: GObject.Object) => void,
1055
- ): number;
1056
- emit(signal: 'extension-removed', info: PluginInfo, extension: GObject.Object): void;
1097
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1098
+ emit<K extends keyof ExtensionSet.SignalSignatures>(
1099
+ signal: K,
1100
+ ...args: GObject.GjsParameters<ExtensionSet.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1101
+ ): void;
1102
+ emit(signal: string, ...args: any[]): void;
1057
1103
 
1058
1104
  // Methods
1059
1105
 
@@ -1608,6 +1654,15 @@ export namespace Peas {
1608
1654
  }
1609
1655
 
1610
1656
  namespace ObjectModule {
1657
+ // Signal signatures
1658
+ interface SignalSignatures extends GObject.TypeModule.SignalSignatures {
1659
+ 'notify::local-linkage': (pspec: GObject.ParamSpec) => void;
1660
+ 'notify::module-name': (pspec: GObject.ParamSpec) => void;
1661
+ 'notify::path': (pspec: GObject.ParamSpec) => void;
1662
+ 'notify::resident': (pspec: GObject.ParamSpec) => void;
1663
+ 'notify::symbol': (pspec: GObject.ParamSpec) => void;
1664
+ }
1665
+
1611
1666
  // Constructor properties interface
1612
1667
 
1613
1668
  interface ConstructorProps extends GObject.TypeModule.ConstructorProps, GObject.TypePlugin.ConstructorProps {
@@ -1648,12 +1703,39 @@ export namespace Peas {
1648
1703
  get resident(): boolean;
1649
1704
  get symbol(): string;
1650
1705
 
1706
+ /**
1707
+ * Compile-time signal type information.
1708
+ *
1709
+ * This instance property is generated only for TypeScript type checking.
1710
+ * It is not defined at runtime and should not be accessed in JS code.
1711
+ * @internal
1712
+ */
1713
+ $signals: ObjectModule.SignalSignatures;
1714
+
1651
1715
  // Constructors
1652
1716
 
1653
1717
  constructor(properties?: Partial<ObjectModule.ConstructorProps>, ...args: any[]);
1654
1718
 
1655
1719
  _init(...args: any[]): void;
1656
1720
 
1721
+ // Signals
1722
+
1723
+ connect<K extends keyof ObjectModule.SignalSignatures>(
1724
+ signal: K,
1725
+ callback: GObject.SignalCallback<this, ObjectModule.SignalSignatures[K]>,
1726
+ ): number;
1727
+ connect(signal: string, callback: (...args: any[]) => any): number;
1728
+ connect_after<K extends keyof ObjectModule.SignalSignatures>(
1729
+ signal: K,
1730
+ callback: GObject.SignalCallback<this, ObjectModule.SignalSignatures[K]>,
1731
+ ): number;
1732
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1733
+ emit<K extends keyof ObjectModule.SignalSignatures>(
1734
+ signal: K,
1735
+ ...args: GObject.GjsParameters<ObjectModule.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1736
+ ): void;
1737
+ emit(signal: string, ...args: any[]): void;
1738
+
1657
1739
  // Methods
1658
1740
 
1659
1741
  /**
@@ -2155,6 +2237,24 @@ export namespace Peas {
2155
2237
  }
2156
2238
 
2157
2239
  namespace PluginInfo {
2240
+ // Signal signatures
2241
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2242
+ 'notify::authors': (pspec: GObject.ParamSpec) => void;
2243
+ 'notify::builtin': (pspec: GObject.ParamSpec) => void;
2244
+ 'notify::copyright': (pspec: GObject.ParamSpec) => void;
2245
+ 'notify::dependencies': (pspec: GObject.ParamSpec) => void;
2246
+ 'notify::description': (pspec: GObject.ParamSpec) => void;
2247
+ 'notify::help-uri': (pspec: GObject.ParamSpec) => void;
2248
+ 'notify::hidden': (pspec: GObject.ParamSpec) => void;
2249
+ 'notify::icon-name': (pspec: GObject.ParamSpec) => void;
2250
+ 'notify::loaded': (pspec: GObject.ParamSpec) => void;
2251
+ 'notify::module-dir': (pspec: GObject.ParamSpec) => void;
2252
+ 'notify::module-name': (pspec: GObject.ParamSpec) => void;
2253
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
2254
+ 'notify::version': (pspec: GObject.ParamSpec) => void;
2255
+ 'notify::website': (pspec: GObject.ParamSpec) => void;
2256
+ }
2257
+
2158
2258
  // Constructor properties interface
2159
2259
 
2160
2260
  interface ConstructorProps extends GObject.Object.ConstructorProps {
@@ -2196,7 +2296,7 @@ export namespace Peas {
2196
2296
  * Authors=Steve Frécinaux &lt;code`istique`.net&gt;
2197
2297
  * Copyright=Copyright © 2009-10 Steve Frécinaux
2198
2298
  * Website=https://wiki.gnome.org/Projects/Libpeas
2199
- * Help=https://gitlab.gnome.org/GNOME/libpeas
2299
+ * Help=http://library.gnome.org/devel/libpeas/stable/
2200
2300
  * Hidden=false
2201
2301
  * ```
2202
2302
  */
@@ -2224,12 +2324,39 @@ export namespace Peas {
2224
2324
  get version(): string;
2225
2325
  get website(): string;
2226
2326
 
2327
+ /**
2328
+ * Compile-time signal type information.
2329
+ *
2330
+ * This instance property is generated only for TypeScript type checking.
2331
+ * It is not defined at runtime and should not be accessed in JS code.
2332
+ * @internal
2333
+ */
2334
+ $signals: PluginInfo.SignalSignatures;
2335
+
2227
2336
  // Constructors
2228
2337
 
2229
2338
  constructor(properties?: Partial<PluginInfo.ConstructorProps>, ...args: any[]);
2230
2339
 
2231
2340
  _init(...args: any[]): void;
2232
2341
 
2342
+ // Signals
2343
+
2344
+ connect<K extends keyof PluginInfo.SignalSignatures>(
2345
+ signal: K,
2346
+ callback: GObject.SignalCallback<this, PluginInfo.SignalSignatures[K]>,
2347
+ ): number;
2348
+ connect(signal: string, callback: (...args: any[]) => any): number;
2349
+ connect_after<K extends keyof PluginInfo.SignalSignatures>(
2350
+ signal: K,
2351
+ callback: GObject.SignalCallback<this, PluginInfo.SignalSignatures[K]>,
2352
+ ): number;
2353
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2354
+ emit<K extends keyof PluginInfo.SignalSignatures>(
2355
+ signal: K,
2356
+ ...args: GObject.GjsParameters<PluginInfo.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2357
+ ): void;
2358
+ emit(signal: string, ...args: any[]): void;
2359
+
2233
2360
  // Static methods
2234
2361
 
2235
2362
  static error_quark(): GLib.Quark;