@girs/gudev-1.0 1.0.0-3.2.6 → 1.0.0-3.2.7

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/gudev-1.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GUdev-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
8
+ GJS TypeScript type definitions for GUdev-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.7.
9
9
 
10
10
  GUdev (libgudev) is a library with GObject bindings to libudev, now made independent, after being part of udev itself, and later systemd.
11
11
 
package/gudev-1.0.d.cts CHANGED
@@ -96,7 +96,7 @@ export interface Client {
96
96
  * @param device_file A device file.
97
97
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
98
98
  */
99
- query_by_device_file(device_file: string | null): Device | null
99
+ query_by_device_file(device_file: string): Device | null
100
100
  /**
101
101
  * Looks up a device for a type and device number.
102
102
  * @param type A value from the #GUdevDeviceType enumeration.
@@ -116,17 +116,17 @@ export interface Client {
116
116
  * @param name The name of the device.
117
117
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
118
118
  */
119
- query_by_subsystem_and_name(subsystem: string | null, name: string | null): Device | null
119
+ query_by_subsystem_and_name(subsystem: string, name: string): Device | null
120
120
  /**
121
121
  * Looks up a device for a sysfs path.
122
122
  * @param sysfs_path A sysfs path.
123
123
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
124
124
  */
125
- query_by_sysfs_path(sysfs_path: string | null): Device | null
125
+ query_by_sysfs_path(sysfs_path: string): Device | null
126
126
 
127
127
  // Own virtual methods of GUdev-1.0.GUdev.Client
128
128
 
129
- vfunc_uevent(action: string | null, device: Device): void
129
+ vfunc_uevent(action: string, device: Device): void
130
130
 
131
131
  // Own signals of GUdev-1.0.GUdev.Client
132
132
 
@@ -225,7 +225,7 @@ export interface Device {
225
225
  * Gets the most recent action (e.g. "add", "remove", "change", etc.) for `device`.
226
226
  * @returns An action string.
227
227
  */
228
- get_action(): string | null
228
+ get_action(): string
229
229
  /**
230
230
  * Gets all current tags for `device`.
231
231
  *
@@ -258,7 +258,7 @@ export interface Device {
258
258
  * Gets the device type for `device`.
259
259
  * @returns The devtype for @device.
260
260
  */
261
- get_devtype(): string | null
261
+ get_devtype(): string
262
262
  /**
263
263
  * Gets the name of the driver used for `device`.
264
264
  * @returns The name of the driver for @device or %NULL if unknown.
@@ -273,12 +273,12 @@ export interface Device {
273
273
  * Gets the name of `device,` e.g. "sda3".
274
274
  * @returns The name of @device.
275
275
  */
276
- get_name(): string | null
276
+ get_name(): string
277
277
  /**
278
278
  * Gets the number of `device,` e.g. "3" if g_udev_device_get_name() returns "sda3".
279
279
  * @returns The number of @device.
280
280
  */
281
- get_number(): string | null
281
+ get_number(): string
282
282
  /**
283
283
  * Gets the immediate parent of `device,` if any.
284
284
  * @returns A #GUdevDevice or %NULL if @device has no parent. Free with g_object_unref().
@@ -291,13 +291,13 @@ export interface Device {
291
291
  * @param devtype The devtype of the parent to get or %NULL.
292
292
  * @returns A #GUdevDevice or %NULL if @device has no parent with @subsystem and @devtype. Free with g_object_unref().
293
293
  */
294
- get_parent_with_subsystem(subsystem: string | null, devtype: string | null): Device | null
294
+ get_parent_with_subsystem(subsystem: string, devtype: string | null): Device | null
295
295
  /**
296
296
  * Look up the value for `key` on `device`.
297
297
  * @param key Name of property.
298
298
  * @returns The value for @key or %NULL if @key doesn't exist on @device. Do not free this string, it is owned by @device.
299
299
  */
300
- get_property(key: string | null): string | null
300
+ get_property(key: string): string | null
301
301
 
302
302
  // Overloads of get_property
303
303
 
@@ -321,7 +321,7 @@ export interface Device {
321
321
  * @param property_name the name of the property to get
322
322
  * @param value return location for the property value
323
323
  */
324
- get_property(property_name: string | null, value: any): void
324
+ get_property(property_name: string, value: any): void
325
325
  /**
326
326
  * Look up the value for `key` on `device` and convert it to an
327
327
  * boolean. This is done by doing a case-insensitive string comparison
@@ -329,21 +329,21 @@ export interface Device {
329
329
  * @param key Name of property.
330
330
  * @returns The value for @key or %FALSE if @key doesn't exist or isn't a #gboolean.
331
331
  */
332
- get_property_as_boolean(key: string | null): boolean
332
+ get_property_as_boolean(key: string): boolean
333
333
  /**
334
334
  * Look up the value for `key` on `device` and convert it to a double
335
335
  * precision floating point number using g_ascii_strtod().
336
336
  * @param key Name of property.
337
337
  * @returns The value for @key or 0.0 if @key doesn't exist or isn't a #gdouble.
338
338
  */
339
- get_property_as_double(key: string | null): number
339
+ get_property_as_double(key: string): number
340
340
  /**
341
341
  * Look up the value for `key` on `device` and convert it to an integer
342
342
  * using strtol().
343
343
  * @param key Name of property.
344
344
  * @returns The value for @key or 0 if @key doesn't exist or isn't an integer.
345
345
  */
346
- get_property_as_int(key: string | null): number
346
+ get_property_as_int(key: string): number
347
347
  /**
348
348
  * Look up the value for `key` on `device` and return the result of
349
349
  * splitting it into non-empty tokens split at white space (only space
@@ -353,14 +353,14 @@ export interface Device {
353
353
  * @param key Name of property.
354
354
  * @returns The value of @key on @device split into tokens or %NULL if @key doesn't exist. This array is owned by @device and should not be freed by the caller.
355
355
  */
356
- get_property_as_strv(key: string | null): string[] | null
356
+ get_property_as_strv(key: string): string[] | null
357
357
  /**
358
358
  * Look up the value for `key` on `device` and convert it to an unsigned
359
359
  * 64-bit integer using g_ascii_strtoull().
360
360
  * @param key Name of property.
361
361
  * @returns The value for @key or 0 if @key doesn't exist or isn't a #guint64.
362
362
  */
363
- get_property_as_uint64(key: string | null): number
363
+ get_property_as_uint64(key: string): number
364
364
  /**
365
365
  * Gets all keys for properties on `device`.
366
366
  * @returns A %NULL terminated string array of property keys. This array is owned by @device and should not be freed by the caller.
@@ -375,7 +375,7 @@ export interface Device {
375
375
  * Gets the subsystem for `device`.
376
376
  * @returns The subsystem for @device.
377
377
  */
378
- get_subsystem(): string | null
378
+ get_subsystem(): string
379
379
  /**
380
380
  * Look up the sysfs attribute with `name` on `device`. The retrieved value
381
381
  * is cached in the device. Repeated calls will return the same value and
@@ -384,7 +384,7 @@ export interface Device {
384
384
  * @param name Name of the sysfs attribute.
385
385
  * @returns The value of the sysfs attribute or %NULL if there is no such attribute. Do not free this string, it is owned by @device.
386
386
  */
387
- get_sysfs_attr(name: string | null): string | null
387
+ get_sysfs_attr(name: string): string | null
388
388
  /**
389
389
  * Look up the sysfs attribute with `name` on `device` and convert it to an
390
390
  * boolean. This is done by doing a case-insensitive string comparison
@@ -395,7 +395,7 @@ export interface Device {
395
395
  * @param name Name of the sysfs attribute.
396
396
  * @returns The value of the sysfs attribute or %FALSE if there is no such attribute.
397
397
  */
398
- get_sysfs_attr_as_boolean(name: string | null): boolean
398
+ get_sysfs_attr_as_boolean(name: string): boolean
399
399
  /**
400
400
  * Look up the sysfs attribute with `name` on `device` and convert it to an
401
401
  * boolean. This is done by doing a case-insensitive string comparison
@@ -406,7 +406,7 @@ export interface Device {
406
406
  * @param name Name of the sysfs attribute.
407
407
  * @returns The value of the sysfs attribute or %FALSE if there is no such attribute.
408
408
  */
409
- get_sysfs_attr_as_boolean_uncached(name: string | null): boolean
409
+ get_sysfs_attr_as_boolean_uncached(name: string): boolean
410
410
  /**
411
411
  * Look up the sysfs attribute with `name` on `device` and convert it to a double
412
412
  * precision floating point number using g_ascii_strtod(). The retrieved value is cached
@@ -415,7 +415,7 @@ export interface Device {
415
415
  * @param name Name of the sysfs attribute.
416
416
  * @returns The value of the sysfs attribute or 0.0 if there is no such attribute.
417
417
  */
418
- get_sysfs_attr_as_double(name: string | null): number
418
+ get_sysfs_attr_as_double(name: string): number
419
419
  /**
420
420
  * Look up the sysfs attribute with `name` on `device` and convert it to a double
421
421
  * precision floating point number using g_ascii_strtod(). This function does blocking
@@ -425,7 +425,7 @@ export interface Device {
425
425
  * @param name Name of the sysfs attribute.
426
426
  * @returns The value of the sysfs attribute or 0.0 if there is no such attribute.
427
427
  */
428
- get_sysfs_attr_as_double_uncached(name: string | null): number
428
+ get_sysfs_attr_as_double_uncached(name: string): number
429
429
  /**
430
430
  * Look up the sysfs attribute with `name` on `device` and convert it to an integer
431
431
  * using strtol(). The retrieved value is cached in the device. Repeated calls
@@ -434,7 +434,7 @@ export interface Device {
434
434
  * @param name Name of the sysfs attribute.
435
435
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
436
436
  */
437
- get_sysfs_attr_as_int(name: string | null): number
437
+ get_sysfs_attr_as_int(name: string): number
438
438
  /**
439
439
  * Look up the sysfs attribute with `name` on `device` and convert it to an integer
440
440
  * using strtol(). This function does blocking I/O, and updates the sysfs
@@ -444,7 +444,7 @@ export interface Device {
444
444
  * @param name Name of the sysfs attribute.
445
445
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
446
446
  */
447
- get_sysfs_attr_as_int_uncached(name: string | null): number
447
+ get_sysfs_attr_as_int_uncached(name: string): number
448
448
  /**
449
449
  * Look up the sysfs attribute with `name` on `device` and return the result of
450
450
  * splitting it into non-empty tokens split at white space (only space (' '),
@@ -458,7 +458,7 @@ export interface Device {
458
458
  * @param name Name of the sysfs attribute.
459
459
  * @returns The value of the sysfs attribute split into tokens or %NULL if there is no such attribute. This array is owned by @device and should not be freed by the caller.
460
460
  */
461
- get_sysfs_attr_as_strv(name: string | null): string[] | null
461
+ get_sysfs_attr_as_strv(name: string): string[] | null
462
462
  /**
463
463
  * Look up the sysfs attribute with `name` on `device` and return the result of
464
464
  * splitting it into non-empty tokens split at white space (only space (' '),
@@ -470,7 +470,7 @@ export interface Device {
470
470
  * @param name Name of the sysfs attribute.
471
471
  * @returns The value of the sysfs attribute split into tokens or %NULL if there is no such attribute. This array is owned by @device and should not be freed by the caller. Before version 238 the uncached getters would not strip trailing newlines.
472
472
  */
473
- get_sysfs_attr_as_strv_uncached(name: string | null): string[] | null
473
+ get_sysfs_attr_as_strv_uncached(name: string): string[] | null
474
474
  /**
475
475
  * Look up the sysfs attribute with `name` on `device` and convert it to an unsigned
476
476
  * 64-bit integer using g_ascii_strtoull(). The retrieved value is cached in the
@@ -479,7 +479,7 @@ export interface Device {
479
479
  * @param name Name of the sysfs attribute.
480
480
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
481
481
  */
482
- get_sysfs_attr_as_uint64(name: string | null): number
482
+ get_sysfs_attr_as_uint64(name: string): number
483
483
  /**
484
484
  * Look up the sysfs attribute with `name` on `device` and convert it to an unsigned
485
485
  * 64-bit integer using g_ascii_strtoull(). This function does blocking I/O, and
@@ -489,7 +489,7 @@ export interface Device {
489
489
  * @param name Name of the sysfs attribute.
490
490
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
491
491
  */
492
- get_sysfs_attr_as_uint64_uncached(name: string | null): number
492
+ get_sysfs_attr_as_uint64_uncached(name: string): number
493
493
  /**
494
494
  * Gets all keys for sysfs attributes on `device`.
495
495
  * @returns A %NULL terminated string array of sysfs attribute keys. This array is owned by @device and should not be freed by the caller.
@@ -503,12 +503,12 @@ export interface Device {
503
503
  * @param name Name of the sysfs attribute.
504
504
  * @returns The value of the sysfs attribute or %NULL if there is no such attribute. Do not free this string, it is owned by @device.
505
505
  */
506
- get_sysfs_attr_uncached(name: string | null): string | null
506
+ get_sysfs_attr_uncached(name: string): string | null
507
507
  /**
508
508
  * Gets the sysfs path for `device`.
509
509
  * @returns The sysfs path for @device.
510
510
  */
511
- get_sysfs_path(): string | null
511
+ get_sysfs_path(): string
512
512
  /**
513
513
  * Gets all tags for `device`.
514
514
  * @returns A %NULL terminated string array of tags. This array is owned by @device and should not be freed by the caller.
@@ -527,7 +527,7 @@ export interface Device {
527
527
  * @param key Name of property.
528
528
  * @returns %TRUE only if the value for @key exist.
529
529
  */
530
- has_property(key: string | null): boolean
530
+ has_property(key: string): boolean
531
531
  /**
532
532
  * Check if a the sysfs attribute with the given key exists. The
533
533
  * retrieved value is cached in the device. Repeated calls will
@@ -537,7 +537,7 @@ export interface Device {
537
537
  * @param key Name of sysfs attribute.
538
538
  * @returns %TRUE only if the value for @key exist.
539
539
  */
540
- has_sysfs_attr(key: string | null): boolean
540
+ has_sysfs_attr(key: string): boolean
541
541
  /**
542
542
  * Check if a the sysfs attribute with the given key exists. The
543
543
  * retrieved value is cached in the device. Repeated calls will
@@ -547,7 +547,7 @@ export interface Device {
547
547
  * @param key Name of sysfs attribute.
548
548
  * @returns %TRUE only if the value for @key exist.
549
549
  */
550
- has_sysfs_attr_uncached(key: string | null): boolean
550
+ has_sysfs_attr_uncached(key: string): boolean
551
551
 
552
552
  // Class property signals of GUdev-1.0.GUdev.Device
553
553
 
@@ -660,52 +660,52 @@ export interface Enumerator {
660
660
  * @param name Wildcard filter for kernel name e.g. "sda*".
661
661
  * @returns The passed in @enumerator.
662
662
  */
663
- add_match_name(name: string | null): Enumerator
663
+ add_match_name(name: string): Enumerator
664
664
  /**
665
665
  * All returned devices will have a property matching the given `name` and `value`.
666
666
  * @param name Wildcard filter for property name.
667
667
  * @param value Wildcard filter for property value.
668
668
  * @returns The passed in @enumerator.
669
669
  */
670
- add_match_property(name: string | null, value: string | null): Enumerator
670
+ add_match_property(name: string, value: string): Enumerator
671
671
  /**
672
672
  * All returned devices will match the given `subsystem`.
673
673
  * @param subsystem Wildcard for subsystem name e.g. 'scsi' or 'a*'.
674
674
  * @returns The passed in @enumerator.
675
675
  */
676
- add_match_subsystem(subsystem: string | null): Enumerator
676
+ add_match_subsystem(subsystem: string): Enumerator
677
677
  /**
678
678
  * All returned devices will have a sysfs attribute matching the given `name` and `value`.
679
679
  * @param name Wildcard filter for sysfs attribute key.
680
680
  * @param value Wildcard filter for sysfs attribute value.
681
681
  * @returns The passed in @enumerator.
682
682
  */
683
- add_match_sysfs_attr(name: string | null, value: string | null): Enumerator
683
+ add_match_sysfs_attr(name: string, value: string): Enumerator
684
684
  /**
685
685
  * All returned devices will match the given `tag`.
686
686
  * @param tag A udev tag e.g. "udev-acl".
687
687
  * @returns The passed in @enumerator.
688
688
  */
689
- add_match_tag(tag: string | null): Enumerator
689
+ add_match_tag(tag: string): Enumerator
690
690
  /**
691
691
  * All returned devices will not match the given `subsystem`.
692
692
  * @param subsystem Wildcard for subsystem name e.g. 'scsi' or 'a*'.
693
693
  * @returns The passed in @enumerator.
694
694
  */
695
- add_nomatch_subsystem(subsystem: string | null): Enumerator
695
+ add_nomatch_subsystem(subsystem: string): Enumerator
696
696
  /**
697
697
  * All returned devices will not have a sysfs attribute matching the given `name` and `value`.
698
698
  * @param name Wildcard filter for sysfs attribute key.
699
699
  * @param value Wildcard filter for sysfs attribute value.
700
700
  * @returns The passed in @enumerator.
701
701
  */
702
- add_nomatch_sysfs_attr(name: string | null, value: string | null): Enumerator
702
+ add_nomatch_sysfs_attr(name: string, value: string): Enumerator
703
703
  /**
704
704
  * Add a device to the list of devices, to retrieve it back sorted in dependency order.
705
705
  * @param sysfs_path A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda"
706
706
  * @returns The passed in @enumerator.
707
707
  */
708
- add_sysfs_path(sysfs_path: string | null): Enumerator
708
+ add_sysfs_path(sysfs_path: string): Enumerator
709
709
  /**
710
710
  * Executes the query in `enumerator`.
711
711
  * @returns A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list.
@@ -769,7 +769,7 @@ export interface ClientClass {
769
769
  * @field
770
770
  */
771
771
  parent_class: GObject.ObjectClass
772
- uevent: (client: Client, action: string | null, device: Device) => void
772
+ uevent: (client: Client, action: string, device: Device) => void
773
773
  reserved1: () => void
774
774
  reserved2: () => void
775
775
  reserved3: () => void
package/gudev-1.0.d.ts CHANGED
@@ -98,7 +98,7 @@ interface Client {
98
98
  * @param device_file A device file.
99
99
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
100
100
  */
101
- query_by_device_file(device_file: string | null): Device | null
101
+ query_by_device_file(device_file: string): Device | null
102
102
  /**
103
103
  * Looks up a device for a type and device number.
104
104
  * @param type A value from the #GUdevDeviceType enumeration.
@@ -118,17 +118,17 @@ interface Client {
118
118
  * @param name The name of the device.
119
119
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
120
120
  */
121
- query_by_subsystem_and_name(subsystem: string | null, name: string | null): Device | null
121
+ query_by_subsystem_and_name(subsystem: string, name: string): Device | null
122
122
  /**
123
123
  * Looks up a device for a sysfs path.
124
124
  * @param sysfs_path A sysfs path.
125
125
  * @returns A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref().
126
126
  */
127
- query_by_sysfs_path(sysfs_path: string | null): Device | null
127
+ query_by_sysfs_path(sysfs_path: string): Device | null
128
128
 
129
129
  // Own virtual methods of GUdev-1.0.GUdev.Client
130
130
 
131
- vfunc_uevent(action: string | null, device: Device): void
131
+ vfunc_uevent(action: string, device: Device): void
132
132
 
133
133
  // Own signals of GUdev-1.0.GUdev.Client
134
134
 
@@ -227,7 +227,7 @@ interface Device {
227
227
  * Gets the most recent action (e.g. "add", "remove", "change", etc.) for `device`.
228
228
  * @returns An action string.
229
229
  */
230
- get_action(): string | null
230
+ get_action(): string
231
231
  /**
232
232
  * Gets all current tags for `device`.
233
233
  *
@@ -260,7 +260,7 @@ interface Device {
260
260
  * Gets the device type for `device`.
261
261
  * @returns The devtype for @device.
262
262
  */
263
- get_devtype(): string | null
263
+ get_devtype(): string
264
264
  /**
265
265
  * Gets the name of the driver used for `device`.
266
266
  * @returns The name of the driver for @device or %NULL if unknown.
@@ -275,12 +275,12 @@ interface Device {
275
275
  * Gets the name of `device,` e.g. "sda3".
276
276
  * @returns The name of @device.
277
277
  */
278
- get_name(): string | null
278
+ get_name(): string
279
279
  /**
280
280
  * Gets the number of `device,` e.g. "3" if g_udev_device_get_name() returns "sda3".
281
281
  * @returns The number of @device.
282
282
  */
283
- get_number(): string | null
283
+ get_number(): string
284
284
  /**
285
285
  * Gets the immediate parent of `device,` if any.
286
286
  * @returns A #GUdevDevice or %NULL if @device has no parent. Free with g_object_unref().
@@ -293,13 +293,13 @@ interface Device {
293
293
  * @param devtype The devtype of the parent to get or %NULL.
294
294
  * @returns A #GUdevDevice or %NULL if @device has no parent with @subsystem and @devtype. Free with g_object_unref().
295
295
  */
296
- get_parent_with_subsystem(subsystem: string | null, devtype: string | null): Device | null
296
+ get_parent_with_subsystem(subsystem: string, devtype: string | null): Device | null
297
297
  /**
298
298
  * Look up the value for `key` on `device`.
299
299
  * @param key Name of property.
300
300
  * @returns The value for @key or %NULL if @key doesn't exist on @device. Do not free this string, it is owned by @device.
301
301
  */
302
- get_property(key: string | null): string | null
302
+ get_property(key: string): string | null
303
303
 
304
304
  // Overloads of get_property
305
305
 
@@ -323,7 +323,7 @@ interface Device {
323
323
  * @param property_name the name of the property to get
324
324
  * @param value return location for the property value
325
325
  */
326
- get_property(property_name: string | null, value: any): void
326
+ get_property(property_name: string, value: any): void
327
327
  /**
328
328
  * Look up the value for `key` on `device` and convert it to an
329
329
  * boolean. This is done by doing a case-insensitive string comparison
@@ -331,21 +331,21 @@ interface Device {
331
331
  * @param key Name of property.
332
332
  * @returns The value for @key or %FALSE if @key doesn't exist or isn't a #gboolean.
333
333
  */
334
- get_property_as_boolean(key: string | null): boolean
334
+ get_property_as_boolean(key: string): boolean
335
335
  /**
336
336
  * Look up the value for `key` on `device` and convert it to a double
337
337
  * precision floating point number using g_ascii_strtod().
338
338
  * @param key Name of property.
339
339
  * @returns The value for @key or 0.0 if @key doesn't exist or isn't a #gdouble.
340
340
  */
341
- get_property_as_double(key: string | null): number
341
+ get_property_as_double(key: string): number
342
342
  /**
343
343
  * Look up the value for `key` on `device` and convert it to an integer
344
344
  * using strtol().
345
345
  * @param key Name of property.
346
346
  * @returns The value for @key or 0 if @key doesn't exist or isn't an integer.
347
347
  */
348
- get_property_as_int(key: string | null): number
348
+ get_property_as_int(key: string): number
349
349
  /**
350
350
  * Look up the value for `key` on `device` and return the result of
351
351
  * splitting it into non-empty tokens split at white space (only space
@@ -355,14 +355,14 @@ interface Device {
355
355
  * @param key Name of property.
356
356
  * @returns The value of @key on @device split into tokens or %NULL if @key doesn't exist. This array is owned by @device and should not be freed by the caller.
357
357
  */
358
- get_property_as_strv(key: string | null): string[] | null
358
+ get_property_as_strv(key: string): string[] | null
359
359
  /**
360
360
  * Look up the value for `key` on `device` and convert it to an unsigned
361
361
  * 64-bit integer using g_ascii_strtoull().
362
362
  * @param key Name of property.
363
363
  * @returns The value for @key or 0 if @key doesn't exist or isn't a #guint64.
364
364
  */
365
- get_property_as_uint64(key: string | null): number
365
+ get_property_as_uint64(key: string): number
366
366
  /**
367
367
  * Gets all keys for properties on `device`.
368
368
  * @returns A %NULL terminated string array of property keys. This array is owned by @device and should not be freed by the caller.
@@ -377,7 +377,7 @@ interface Device {
377
377
  * Gets the subsystem for `device`.
378
378
  * @returns The subsystem for @device.
379
379
  */
380
- get_subsystem(): string | null
380
+ get_subsystem(): string
381
381
  /**
382
382
  * Look up the sysfs attribute with `name` on `device`. The retrieved value
383
383
  * is cached in the device. Repeated calls will return the same value and
@@ -386,7 +386,7 @@ interface Device {
386
386
  * @param name Name of the sysfs attribute.
387
387
  * @returns The value of the sysfs attribute or %NULL if there is no such attribute. Do not free this string, it is owned by @device.
388
388
  */
389
- get_sysfs_attr(name: string | null): string | null
389
+ get_sysfs_attr(name: string): string | null
390
390
  /**
391
391
  * Look up the sysfs attribute with `name` on `device` and convert it to an
392
392
  * boolean. This is done by doing a case-insensitive string comparison
@@ -397,7 +397,7 @@ interface Device {
397
397
  * @param name Name of the sysfs attribute.
398
398
  * @returns The value of the sysfs attribute or %FALSE if there is no such attribute.
399
399
  */
400
- get_sysfs_attr_as_boolean(name: string | null): boolean
400
+ get_sysfs_attr_as_boolean(name: string): boolean
401
401
  /**
402
402
  * Look up the sysfs attribute with `name` on `device` and convert it to an
403
403
  * boolean. This is done by doing a case-insensitive string comparison
@@ -408,7 +408,7 @@ interface Device {
408
408
  * @param name Name of the sysfs attribute.
409
409
  * @returns The value of the sysfs attribute or %FALSE if there is no such attribute.
410
410
  */
411
- get_sysfs_attr_as_boolean_uncached(name: string | null): boolean
411
+ get_sysfs_attr_as_boolean_uncached(name: string): boolean
412
412
  /**
413
413
  * Look up the sysfs attribute with `name` on `device` and convert it to a double
414
414
  * precision floating point number using g_ascii_strtod(). The retrieved value is cached
@@ -417,7 +417,7 @@ interface Device {
417
417
  * @param name Name of the sysfs attribute.
418
418
  * @returns The value of the sysfs attribute or 0.0 if there is no such attribute.
419
419
  */
420
- get_sysfs_attr_as_double(name: string | null): number
420
+ get_sysfs_attr_as_double(name: string): number
421
421
  /**
422
422
  * Look up the sysfs attribute with `name` on `device` and convert it to a double
423
423
  * precision floating point number using g_ascii_strtod(). This function does blocking
@@ -427,7 +427,7 @@ interface Device {
427
427
  * @param name Name of the sysfs attribute.
428
428
  * @returns The value of the sysfs attribute or 0.0 if there is no such attribute.
429
429
  */
430
- get_sysfs_attr_as_double_uncached(name: string | null): number
430
+ get_sysfs_attr_as_double_uncached(name: string): number
431
431
  /**
432
432
  * Look up the sysfs attribute with `name` on `device` and convert it to an integer
433
433
  * using strtol(). The retrieved value is cached in the device. Repeated calls
@@ -436,7 +436,7 @@ interface Device {
436
436
  * @param name Name of the sysfs attribute.
437
437
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
438
438
  */
439
- get_sysfs_attr_as_int(name: string | null): number
439
+ get_sysfs_attr_as_int(name: string): number
440
440
  /**
441
441
  * Look up the sysfs attribute with `name` on `device` and convert it to an integer
442
442
  * using strtol(). This function does blocking I/O, and updates the sysfs
@@ -446,7 +446,7 @@ interface Device {
446
446
  * @param name Name of the sysfs attribute.
447
447
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
448
448
  */
449
- get_sysfs_attr_as_int_uncached(name: string | null): number
449
+ get_sysfs_attr_as_int_uncached(name: string): number
450
450
  /**
451
451
  * Look up the sysfs attribute with `name` on `device` and return the result of
452
452
  * splitting it into non-empty tokens split at white space (only space (' '),
@@ -460,7 +460,7 @@ interface Device {
460
460
  * @param name Name of the sysfs attribute.
461
461
  * @returns The value of the sysfs attribute split into tokens or %NULL if there is no such attribute. This array is owned by @device and should not be freed by the caller.
462
462
  */
463
- get_sysfs_attr_as_strv(name: string | null): string[] | null
463
+ get_sysfs_attr_as_strv(name: string): string[] | null
464
464
  /**
465
465
  * Look up the sysfs attribute with `name` on `device` and return the result of
466
466
  * splitting it into non-empty tokens split at white space (only space (' '),
@@ -472,7 +472,7 @@ interface Device {
472
472
  * @param name Name of the sysfs attribute.
473
473
  * @returns The value of the sysfs attribute split into tokens or %NULL if there is no such attribute. This array is owned by @device and should not be freed by the caller. Before version 238 the uncached getters would not strip trailing newlines.
474
474
  */
475
- get_sysfs_attr_as_strv_uncached(name: string | null): string[] | null
475
+ get_sysfs_attr_as_strv_uncached(name: string): string[] | null
476
476
  /**
477
477
  * Look up the sysfs attribute with `name` on `device` and convert it to an unsigned
478
478
  * 64-bit integer using g_ascii_strtoull(). The retrieved value is cached in the
@@ -481,7 +481,7 @@ interface Device {
481
481
  * @param name Name of the sysfs attribute.
482
482
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
483
483
  */
484
- get_sysfs_attr_as_uint64(name: string | null): number
484
+ get_sysfs_attr_as_uint64(name: string): number
485
485
  /**
486
486
  * Look up the sysfs attribute with `name` on `device` and convert it to an unsigned
487
487
  * 64-bit integer using g_ascii_strtoull(). This function does blocking I/O, and
@@ -491,7 +491,7 @@ interface Device {
491
491
  * @param name Name of the sysfs attribute.
492
492
  * @returns The value of the sysfs attribute or 0 if there is no such attribute.
493
493
  */
494
- get_sysfs_attr_as_uint64_uncached(name: string | null): number
494
+ get_sysfs_attr_as_uint64_uncached(name: string): number
495
495
  /**
496
496
  * Gets all keys for sysfs attributes on `device`.
497
497
  * @returns A %NULL terminated string array of sysfs attribute keys. This array is owned by @device and should not be freed by the caller.
@@ -505,12 +505,12 @@ interface Device {
505
505
  * @param name Name of the sysfs attribute.
506
506
  * @returns The value of the sysfs attribute or %NULL if there is no such attribute. Do not free this string, it is owned by @device.
507
507
  */
508
- get_sysfs_attr_uncached(name: string | null): string | null
508
+ get_sysfs_attr_uncached(name: string): string | null
509
509
  /**
510
510
  * Gets the sysfs path for `device`.
511
511
  * @returns The sysfs path for @device.
512
512
  */
513
- get_sysfs_path(): string | null
513
+ get_sysfs_path(): string
514
514
  /**
515
515
  * Gets all tags for `device`.
516
516
  * @returns A %NULL terminated string array of tags. This array is owned by @device and should not be freed by the caller.
@@ -529,7 +529,7 @@ interface Device {
529
529
  * @param key Name of property.
530
530
  * @returns %TRUE only if the value for @key exist.
531
531
  */
532
- has_property(key: string | null): boolean
532
+ has_property(key: string): boolean
533
533
  /**
534
534
  * Check if a the sysfs attribute with the given key exists. The
535
535
  * retrieved value is cached in the device. Repeated calls will
@@ -539,7 +539,7 @@ interface Device {
539
539
  * @param key Name of sysfs attribute.
540
540
  * @returns %TRUE only if the value for @key exist.
541
541
  */
542
- has_sysfs_attr(key: string | null): boolean
542
+ has_sysfs_attr(key: string): boolean
543
543
  /**
544
544
  * Check if a the sysfs attribute with the given key exists. The
545
545
  * retrieved value is cached in the device. Repeated calls will
@@ -549,7 +549,7 @@ interface Device {
549
549
  * @param key Name of sysfs attribute.
550
550
  * @returns %TRUE only if the value for @key exist.
551
551
  */
552
- has_sysfs_attr_uncached(key: string | null): boolean
552
+ has_sysfs_attr_uncached(key: string): boolean
553
553
 
554
554
  // Class property signals of GUdev-1.0.GUdev.Device
555
555
 
@@ -662,52 +662,52 @@ interface Enumerator {
662
662
  * @param name Wildcard filter for kernel name e.g. "sda*".
663
663
  * @returns The passed in @enumerator.
664
664
  */
665
- add_match_name(name: string | null): Enumerator
665
+ add_match_name(name: string): Enumerator
666
666
  /**
667
667
  * All returned devices will have a property matching the given `name` and `value`.
668
668
  * @param name Wildcard filter for property name.
669
669
  * @param value Wildcard filter for property value.
670
670
  * @returns The passed in @enumerator.
671
671
  */
672
- add_match_property(name: string | null, value: string | null): Enumerator
672
+ add_match_property(name: string, value: string): Enumerator
673
673
  /**
674
674
  * All returned devices will match the given `subsystem`.
675
675
  * @param subsystem Wildcard for subsystem name e.g. 'scsi' or 'a*'.
676
676
  * @returns The passed in @enumerator.
677
677
  */
678
- add_match_subsystem(subsystem: string | null): Enumerator
678
+ add_match_subsystem(subsystem: string): Enumerator
679
679
  /**
680
680
  * All returned devices will have a sysfs attribute matching the given `name` and `value`.
681
681
  * @param name Wildcard filter for sysfs attribute key.
682
682
  * @param value Wildcard filter for sysfs attribute value.
683
683
  * @returns The passed in @enumerator.
684
684
  */
685
- add_match_sysfs_attr(name: string | null, value: string | null): Enumerator
685
+ add_match_sysfs_attr(name: string, value: string): Enumerator
686
686
  /**
687
687
  * All returned devices will match the given `tag`.
688
688
  * @param tag A udev tag e.g. "udev-acl".
689
689
  * @returns The passed in @enumerator.
690
690
  */
691
- add_match_tag(tag: string | null): Enumerator
691
+ add_match_tag(tag: string): Enumerator
692
692
  /**
693
693
  * All returned devices will not match the given `subsystem`.
694
694
  * @param subsystem Wildcard for subsystem name e.g. 'scsi' or 'a*'.
695
695
  * @returns The passed in @enumerator.
696
696
  */
697
- add_nomatch_subsystem(subsystem: string | null): Enumerator
697
+ add_nomatch_subsystem(subsystem: string): Enumerator
698
698
  /**
699
699
  * All returned devices will not have a sysfs attribute matching the given `name` and `value`.
700
700
  * @param name Wildcard filter for sysfs attribute key.
701
701
  * @param value Wildcard filter for sysfs attribute value.
702
702
  * @returns The passed in @enumerator.
703
703
  */
704
- add_nomatch_sysfs_attr(name: string | null, value: string | null): Enumerator
704
+ add_nomatch_sysfs_attr(name: string, value: string): Enumerator
705
705
  /**
706
706
  * Add a device to the list of devices, to retrieve it back sorted in dependency order.
707
707
  * @param sysfs_path A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda"
708
708
  * @returns The passed in @enumerator.
709
709
  */
710
- add_sysfs_path(sysfs_path: string | null): Enumerator
710
+ add_sysfs_path(sysfs_path: string): Enumerator
711
711
  /**
712
712
  * Executes the query in `enumerator`.
713
713
  * @returns A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list.
@@ -771,7 +771,7 @@ interface ClientClass {
771
771
  * @field
772
772
  */
773
773
  parent_class: GObject.ObjectClass
774
- uevent: (client: Client, action: string | null, device: Device) => void
774
+ uevent: (client: Client, action: string, device: Device) => void
775
775
  reserved1: () => void
776
776
  reserved2: () => void
777
777
  reserved3: () => void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gudev-1.0",
3
- "version": "1.0.0-3.2.6",
3
+ "version": "1.0.0-3.2.7",
4
4
  "description": "GJS TypeScript type definitions for GUdev-1.0, generated from library version 1.0.0",
5
5
  "type": "module",
6
6
  "module": "gudev-1.0.js",
@@ -25,9 +25,9 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gudev-1.0.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gjs": "^3.2.6",
29
- "@girs/glib-2.0": "^2.78.0-3.2.6",
30
- "@girs/gobject-2.0": "^2.78.0-3.2.6"
28
+ "@girs/gjs": "^3.2.7",
29
+ "@girs/glib-2.0": "^2.78.0-3.2.7",
30
+ "@girs/gobject-2.0": "^2.78.0-3.2.7"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "*"