@girs/gobject-2.0 2.82.2-4.0.0-beta.18 → 2.82.2-4.0.0-beta.19

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.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gobject-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GObject-2.0, generated from library version 2.82.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.18.
8
+ GJS TypeScript type definitions for GObject-2.0, generated from library version 2.82.2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.19.
9
9
 
10
10
 
11
11
  ## Install
package/gobject-2.0.d.ts CHANGED
@@ -40,6 +40,7 @@ export namespace GObject {
40
40
  Template?: Uint8Array | GLib.Bytes | string;
41
41
  Children?: string[];
42
42
  InternalChildren?: string[];
43
+ Requires?: Object[];
43
44
  }
44
45
 
45
46
  // Correctly types interface checks.
@@ -941,7 +942,7 @@ export namespace GObject {
941
942
  nick: string | null,
942
943
  blurb: string | null,
943
944
  default_value: boolean,
944
- flags: ParamFlags,
945
+ flags: ParamFlags | null,
945
946
  ): ParamSpec;
946
947
  /**
947
948
  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
@@ -960,7 +961,7 @@ export namespace GObject {
960
961
  nick: string | null,
961
962
  blurb: string | null,
962
963
  boxed_type: GType,
963
- flags: ParamFlags,
964
+ flags: ParamFlags | null,
964
965
  ): ParamSpec;
965
966
  /**
966
967
  * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
@@ -980,7 +981,7 @@ export namespace GObject {
980
981
  minimum: number,
981
982
  maximum: number,
982
983
  default_value: number,
983
- flags: ParamFlags,
984
+ flags: ParamFlags | null,
984
985
  ): ParamSpec;
985
986
  /**
986
987
  * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
@@ -1003,7 +1004,7 @@ export namespace GObject {
1003
1004
  minimum: number,
1004
1005
  maximum: number,
1005
1006
  default_value: number,
1006
- flags: ParamFlags,
1007
+ flags: ParamFlags | null,
1007
1008
  ): ParamSpec;
1008
1009
  /**
1009
1010
  * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM
@@ -1024,7 +1025,7 @@ export namespace GObject {
1024
1025
  blurb: string | null,
1025
1026
  enum_type: GType,
1026
1027
  default_value: number,
1027
- flags: ParamFlags,
1028
+ flags: ParamFlags | null,
1028
1029
  ): ParamSpec;
1029
1030
  /**
1030
1031
  * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS
@@ -1045,7 +1046,7 @@ export namespace GObject {
1045
1046
  blurb: string | null,
1046
1047
  flags_type: GType,
1047
1048
  default_value: number,
1048
- flags: ParamFlags,
1049
+ flags: ParamFlags | null,
1049
1050
  ): ParamSpec;
1050
1051
  /**
1051
1052
  * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
@@ -1067,7 +1068,7 @@ export namespace GObject {
1067
1068
  minimum: number,
1068
1069
  maximum: number,
1069
1070
  default_value: number,
1070
- flags: ParamFlags,
1071
+ flags: ParamFlags | null,
1071
1072
  ): ParamSpec;
1072
1073
  /**
1073
1074
  * Creates a new #GParamSpecGType instance specifying a
@@ -1086,7 +1087,7 @@ export namespace GObject {
1086
1087
  nick: string | null,
1087
1088
  blurb: string | null,
1088
1089
  is_a_type: GType,
1089
- flags: ParamFlags,
1090
+ flags: ParamFlags | null,
1090
1091
  ): ParamSpec;
1091
1092
  /**
1092
1093
  * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
@@ -1108,7 +1109,7 @@ export namespace GObject {
1108
1109
  minimum: number,
1109
1110
  maximum: number,
1110
1111
  default_value: number,
1111
- flags: ParamFlags,
1112
+ flags: ParamFlags | null,
1112
1113
  ): ParamSpec;
1113
1114
  /**
1114
1115
  * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
@@ -1130,7 +1131,7 @@ export namespace GObject {
1130
1131
  minimum: number,
1131
1132
  maximum: number,
1132
1133
  default_value: number,
1133
- flags: ParamFlags,
1134
+ flags: ParamFlags | null,
1134
1135
  ): ParamSpec;
1135
1136
  /**
1136
1137
  * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
@@ -1152,7 +1153,7 @@ export namespace GObject {
1152
1153
  minimum: number,
1153
1154
  maximum: number,
1154
1155
  default_value: number,
1155
- flags: ParamFlags,
1156
+ flags: ParamFlags | null,
1156
1157
  ): ParamSpec;
1157
1158
  /**
1158
1159
  * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT
@@ -1171,7 +1172,7 @@ export namespace GObject {
1171
1172
  nick: string | null,
1172
1173
  blurb: string | null,
1173
1174
  object_type: GType,
1174
- flags: ParamFlags,
1175
+ flags: ParamFlags | null,
1175
1176
  ): ParamSpec;
1176
1177
  /**
1177
1178
  * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM
@@ -1190,7 +1191,7 @@ export namespace GObject {
1190
1191
  nick: string | null,
1191
1192
  blurb: string | null,
1192
1193
  param_type: GType,
1193
- flags: ParamFlags,
1194
+ flags: ParamFlags | null,
1194
1195
  ): ParamSpec;
1195
1196
  /**
1196
1197
  * Creates a new #GParamSpecPointer instance specifying a pointer property.
@@ -1204,7 +1205,12 @@ export namespace GObject {
1204
1205
  * @param flags flags for the property specified
1205
1206
  * @returns a newly created parameter specification
1206
1207
  */
1207
- function param_spec_pointer(name: string, nick: string | null, blurb: string | null, flags: ParamFlags): ParamSpec;
1208
+ function param_spec_pointer(
1209
+ name: string,
1210
+ nick: string | null,
1211
+ blurb: string | null,
1212
+ flags: ParamFlags | null,
1213
+ ): ParamSpec;
1208
1214
  /**
1209
1215
  * Creates a new #GParamSpecString instance.
1210
1216
  *
@@ -1221,7 +1227,7 @@ export namespace GObject {
1221
1227
  nick: string | null,
1222
1228
  blurb: string | null,
1223
1229
  default_value: string | null,
1224
- flags: ParamFlags,
1230
+ flags: ParamFlags | null,
1225
1231
  ): ParamSpec;
1226
1232
  /**
1227
1233
  * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
@@ -1241,7 +1247,7 @@ export namespace GObject {
1241
1247
  minimum: number,
1242
1248
  maximum: number,
1243
1249
  default_value: number,
1244
- flags: ParamFlags,
1250
+ flags: ParamFlags | null,
1245
1251
  ): ParamSpec;
1246
1252
  /**
1247
1253
  * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
@@ -1263,7 +1269,7 @@ export namespace GObject {
1263
1269
  minimum: number,
1264
1270
  maximum: number,
1265
1271
  default_value: number,
1266
- flags: ParamFlags,
1272
+ flags: ParamFlags | null,
1267
1273
  ): ParamSpec;
1268
1274
  /**
1269
1275
  * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
@@ -1286,7 +1292,7 @@ export namespace GObject {
1286
1292
  minimum: number,
1287
1293
  maximum: number,
1288
1294
  default_value: number,
1289
- flags: ParamFlags,
1295
+ flags: ParamFlags | null,
1290
1296
  ): ParamSpec;
1291
1297
  /**
1292
1298
  * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG
@@ -1309,7 +1315,7 @@ export namespace GObject {
1309
1315
  minimum: number,
1310
1316
  maximum: number,
1311
1317
  default_value: number,
1312
- flags: ParamFlags,
1318
+ flags: ParamFlags | null,
1313
1319
  ): ParamSpec;
1314
1320
  /**
1315
1321
  * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
@@ -1329,7 +1335,7 @@ export namespace GObject {
1329
1335
  nick: string | null,
1330
1336
  blurb: string | null,
1331
1337
  default_value: number,
1332
- flags: ParamFlags,
1338
+ flags: ParamFlags | null,
1333
1339
  ): ParamSpec;
1334
1340
  /**
1335
1341
  * Creates a new #GParamSpecVariant instance specifying a #GVariant
@@ -1352,7 +1358,7 @@ export namespace GObject {
1352
1358
  blurb: string | null,
1353
1359
  type: GLib.VariantType,
1354
1360
  default_value: GLib.Variant | null,
1355
- flags: ParamFlags,
1361
+ flags: ParamFlags | null,
1356
1362
  ): ParamSpec;
1357
1363
  /**
1358
1364
  * Registers `name` as the name of a new static type derived
@@ -1634,7 +1640,7 @@ export namespace GObject {
1634
1640
  */
1635
1641
  function signal_handlers_block_matched(
1636
1642
  instance: Object,
1637
- mask: SignalMatchType,
1643
+ mask: SignalMatchType | null,
1638
1644
  signal_id: number,
1639
1645
  detail: GLib.Quark,
1640
1646
  func?: any | null,
@@ -1672,7 +1678,7 @@ export namespace GObject {
1672
1678
  */
1673
1679
  function signal_handlers_disconnect_matched(
1674
1680
  instance: Object,
1675
- mask: SignalMatchType,
1681
+ mask: SignalMatchType | null,
1676
1682
  signal_id: number,
1677
1683
  detail: GLib.Quark,
1678
1684
  func?: any | null,
@@ -1704,7 +1710,7 @@ export namespace GObject {
1704
1710
  */
1705
1711
  function signal_handlers_unblock_matched(
1706
1712
  instance: Object,
1707
- mask: SignalMatchType,
1713
+ mask: SignalMatchType | null,
1708
1714
  signal_id: number,
1709
1715
  detail: GLib.Quark,
1710
1716
  func?: any | null,
@@ -1802,7 +1808,7 @@ export namespace GObject {
1802
1808
  function signal_newv(
1803
1809
  signal_name: string,
1804
1810
  itype: GType,
1805
- signal_flags: SignalFlags,
1811
+ signal_flags: SignalFlags | null,
1806
1812
  class_closure: Closure | null,
1807
1813
  c_marshaller: SignalCMarshaller | null,
1808
1814
  return_type: GType,
@@ -2160,7 +2166,7 @@ export namespace GObject {
2160
2166
  * environment variable.
2161
2167
  * @param debug_flags bitwise combination of #GTypeDebugFlags values for debugging purposes
2162
2168
  */
2163
- function type_init_with_debug_flags(debug_flags: TypeDebugFlags): void;
2169
+ function type_init_with_debug_flags(debug_flags: TypeDebugFlags | null): void;
2164
2170
  /**
2165
2171
  * Adds `prerequisite_type` to the list of prerequisites of `interface_type`.
2166
2172
  * This means that any type implementing `interface_type` must also implement
@@ -2286,7 +2292,12 @@ export namespace GObject {
2286
2292
  * @param flags bitwise combination of #GTypeFlags values
2287
2293
  * @returns the new type identifier or %G_TYPE_INVALID if registration failed
2288
2294
  */
2289
- function type_register_dynamic(parent_type: GType, type_name: string, plugin: TypePlugin, flags: TypeFlags): GType;
2295
+ function type_register_dynamic(
2296
+ parent_type: GType,
2297
+ type_name: string,
2298
+ plugin: TypePlugin,
2299
+ flags: TypeFlags | null,
2300
+ ): GType;
2290
2301
  /**
2291
2302
  * Registers `type_id` as the predefined identifier and `type_name` as the
2292
2303
  * name of a fundamental type. If `type_id` is already registered, or a
@@ -2307,7 +2318,7 @@ export namespace GObject {
2307
2318
  type_name: string,
2308
2319
  info: TypeInfo,
2309
2320
  finfo: TypeFundamentalInfo,
2310
- flags: TypeFlags,
2321
+ flags: TypeFlags | null,
2311
2322
  ): GType;
2312
2323
  /**
2313
2324
  * Registers `type_name` as the name of a new static type derived from
@@ -2321,7 +2332,12 @@ export namespace GObject {
2321
2332
  * @param flags bitwise combination of #GTypeFlags values
2322
2333
  * @returns the new type identifier
2323
2334
  */
2324
- function type_register_static(parent_type: GType, type_name: string, info: TypeInfo, flags: TypeFlags): GType;
2335
+ function type_register_static(
2336
+ parent_type: GType,
2337
+ type_name: string,
2338
+ info: TypeInfo,
2339
+ flags: TypeFlags | null,
2340
+ ): GType;
2325
2341
  /**
2326
2342
  * Attaches arbitrary data to a type.
2327
2343
  * @param type a #GType
@@ -3158,7 +3174,7 @@ export namespace GObject {
3158
3174
  * @param target_property the property on @target to bind
3159
3175
  * @param flags the flags used to create the #GBinding
3160
3176
  */
3161
- bind(source_property: string, target: Object, target_property: string, flags: BindingFlags): void;
3177
+ bind(source_property: string, target: Object, target_property: string, flags: BindingFlags | null): void;
3162
3178
  /**
3163
3179
  * Creates a binding between `source_property` on the source object and
3164
3180
  * `target_property` on `target,` allowing you to set the transformation
@@ -3177,7 +3193,7 @@ export namespace GObject {
3177
3193
  source_property: string,
3178
3194
  target: Object,
3179
3195
  target_property: string,
3180
- flags: BindingFlags,
3196
+ flags: BindingFlags | null,
3181
3197
  transform_to?: BindingTransformFunc | null,
3182
3198
  transform_from?: BindingTransformFunc | null,
3183
3199
  ): void;
@@ -3203,7 +3219,7 @@ export namespace GObject {
3203
3219
  source_property: string,
3204
3220
  target: Object,
3205
3221
  target_property: string,
3206
- flags: BindingFlags,
3222
+ flags: BindingFlags | null,
3207
3223
  transform_to?: Closure | null,
3208
3224
  transform_from?: Closure | null,
3209
3225
  ): void;
@@ -3458,7 +3474,12 @@ export namespace GObject {
3458
3474
  * @param flags flags to pass to #GBinding
3459
3475
  * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
3460
3476
  */
3461
- bind_property(source_property: string, target: Object, target_property: string, flags: BindingFlags): Binding;
3477
+ bind_property(
3478
+ source_property: string,
3479
+ target: Object,
3480
+ target_property: string,
3481
+ flags: BindingFlags | null,
3482
+ ): Binding;
3462
3483
  /**
3463
3484
  * Complete version of g_object_bind_property().
3464
3485
  *
@@ -3498,7 +3519,7 @@ export namespace GObject {
3498
3519
  source_property: string,
3499
3520
  target: Object,
3500
3521
  target_property: string,
3501
- flags: BindingFlags,
3522
+ flags: BindingFlags | null,
3502
3523
  transform_to?: BindingTransformFunc | null,
3503
3524
  transform_from?: BindingTransformFunc | null,
3504
3525
  notify?: GLib.DestroyNotify | null,
@@ -3523,7 +3544,7 @@ export namespace GObject {
3523
3544
  source_property: string,
3524
3545
  target: Object,
3525
3546
  target_property: string,
3526
- flags: BindingFlags,
3547
+ flags: BindingFlags | null,
3527
3548
  transform_to: Closure,
3528
3549
  transform_from: Closure,
3529
3550
  ): Binding;
@@ -4168,7 +4189,12 @@ export namespace GObject {
4168
4189
  * @param notify function to be called when disposing of @self
4169
4190
  * @param flags the flags used to create the signal connection
4170
4191
  */
4171
- connect_data(detailed_signal: string, c_handler: Callback, notify: ClosureNotify, flags: ConnectFlags): void;
4192
+ connect_data(
4193
+ detailed_signal: string,
4194
+ c_handler: Callback,
4195
+ notify: ClosureNotify,
4196
+ flags: ConnectFlags | null,
4197
+ ): void;
4172
4198
  /**
4173
4199
  * Connects `c_handler` to the signal `detailed_signal`
4174
4200
  * on the target instance of `self`.
@@ -4342,7 +4368,7 @@ export namespace GObject {
4342
4368
  * @param flags flags field providing details about the type
4343
4369
  * @returns the new or existing type ID
4344
4370
  */
4345
- register_type(parent_type: GType, type_name: string, type_info: TypeInfo, flags: TypeFlags): GType;
4371
+ register_type(parent_type: GType, type_name: string, type_info: TypeInfo, flags: TypeFlags | null): GType;
4346
4372
  /**
4347
4373
  * Sets the name for a #GTypeModule
4348
4374
  * @param name a human-readable name to use in error messages.
@@ -4426,7 +4452,12 @@ export namespace GObject {
4426
4452
  * @param flags flags to pass to #GBinding
4427
4453
  * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
4428
4454
  */
4429
- bind_property(source_property: string, target: Object, target_property: string, flags: BindingFlags): Binding;
4455
+ bind_property(
4456
+ source_property: string,
4457
+ target: Object,
4458
+ target_property: string,
4459
+ flags: BindingFlags | null,
4460
+ ): Binding;
4430
4461
  /**
4431
4462
  * Complete version of g_object_bind_property().
4432
4463
  *
@@ -4466,7 +4497,7 @@ export namespace GObject {
4466
4497
  source_property: string,
4467
4498
  target: Object,
4468
4499
  target_property: string,
4469
- flags: BindingFlags,
4500
+ flags: BindingFlags | null,
4470
4501
  transform_to?: BindingTransformFunc | null,
4471
4502
  transform_from?: BindingTransformFunc | null,
4472
4503
  notify?: GLib.DestroyNotify | null,
@@ -6487,7 +6518,9 @@ export namespace GObject {
6487
6518
  use(): void;
6488
6519
  }
6489
6520
 
6490
- export const TypePlugin: TypePluginNamespace;
6521
+ export const TypePlugin: TypePluginNamespace & {
6522
+ new (): TypePlugin; // This allows `obj instanceof TypePlugin`
6523
+ };
6491
6524
 
6492
6525
  type SignalCMarshaller = ClosureMarshal;
6493
6526
  type SignalCVaMarshaller = unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gobject-2.0",
3
- "version": "2.82.2-4.0.0-beta.18",
3
+ "version": "2.82.2-4.0.0-beta.19",
4
4
  "description": "GJS TypeScript type definitions for GObject-2.0, generated from library version 2.82.2",
5
5
  "type": "module",
6
6
  "module": "gobject-2.0.js",
@@ -31,8 +31,8 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.0.0-beta.18",
35
- "@girs/glib-2.0": "^2.82.2-4.0.0-beta.18"
34
+ "@girs/gjs": "^4.0.0-beta.19",
35
+ "@girs/glib-2.0": "^2.82.2-4.0.0-beta.19"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "*"
package/tsconfig.json CHANGED
@@ -15,7 +15,9 @@
15
15
  "removeComments": false,
16
16
  "inlineSourceMap": false,
17
17
  "inlineSources": false,
18
- "newLine": "LF"
18
+ "newLine": "LF",
19
+ // Show diagnostics
20
+ "diagnostics": true
19
21
  },
20
22
  "include": ["./gobject-2.0.d.ts"]
21
23
  }