@girs/gtop-2.0 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/gtop-2.0.d.ts +61 -61
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -5,25 +5,25 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gtop-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GTop-2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.2.0.
8
+ GJS TypeScript type definitions for GTop-2.0 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/gtop-2.0
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 GTop from '@girs/gtop-2.0';
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/gtop-2.0` or `@girs/gtop-2.0/ambient` in your `tsconfig` or entry point Typescript file:
28
28
 
29
29
  `index.ts`:
@@ -42,7 +42,7 @@ import '@girs/gtop-2.0'
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 GTop from 'gi://GTop?version=2.0';
@@ -50,7 +50,7 @@ import GTop from 'gi://GTop?version=2.0';
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/gtop-2.0` or `@girs/gtop-2.0/import` in your `tsconfig` or entry point Typescript file:
55
55
 
56
56
  `index.ts`:
@@ -69,7 +69,7 @@ import '@girs/gtop-2.0'
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 GTop = imports.gi.GTop;
@@ -77,7 +77,7 @@ const GTop = imports.gi.GTop;
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/gtop-2.0.d.ts CHANGED
@@ -849,87 +849,87 @@ export namespace GTop {
849
849
  * @param buf
850
850
  * @param pid
851
851
  */
852
- function glibtop_get_proc_affinity(buf: glibtop_proc_affinity, pid: number): number;
852
+ function glibtop_get_proc_affinity(buf: glibtop_proc_affinity, pid: never): number;
853
853
 
854
854
  /**
855
855
  * @param buf
856
856
  * @param pid
857
857
  * @param max_len
858
858
  */
859
- function glibtop_get_proc_args(buf: glibtop_proc_args, pid: number, max_len: number): string;
859
+ function glibtop_get_proc_args(buf: glibtop_proc_args, pid: never, max_len: number): string;
860
860
 
861
861
  /**
862
862
  * @param buf
863
863
  * @param pid
864
864
  * @param max_len
865
865
  */
866
- function glibtop_get_proc_argv(buf: glibtop_proc_args, pid: number, max_len: number): string[];
866
+ function glibtop_get_proc_argv(buf: glibtop_proc_args, pid: never, max_len: number): string[];
867
867
 
868
868
  /**
869
869
  * @param buf
870
870
  * @param pid
871
871
  */
872
- function glibtop_get_proc_io(buf: glibtop_proc_io, pid: number): void;
872
+ function glibtop_get_proc_io(buf: glibtop_proc_io, pid: never): void;
873
873
 
874
874
  /**
875
875
  * @param buf
876
876
  * @param pid
877
877
  */
878
- function glibtop_get_proc_kernel(buf: glibtop_proc_kernel, pid: number): void;
878
+ function glibtop_get_proc_kernel(buf: glibtop_proc_kernel, pid: never): void;
879
879
 
880
880
  /**
881
881
  * @param buf
882
882
  * @param pid
883
883
  */
884
- function glibtop_get_proc_map(buf: glibtop_proc_map, pid: number): glibtop_map_entry[];
884
+ function glibtop_get_proc_map(buf: glibtop_proc_map, pid: never): glibtop_map_entry[];
885
885
 
886
886
  /**
887
887
  * @param buf
888
888
  * @param pid
889
889
  */
890
- function glibtop_get_proc_mem(buf: glibtop_proc_mem, pid: number): void;
890
+ function glibtop_get_proc_mem(buf: glibtop_proc_mem, pid: never): void;
891
891
 
892
892
  /**
893
893
  * @param buf
894
894
  * @param pid
895
895
  */
896
- function glibtop_get_proc_open_files(buf: glibtop_proc_open_files, pid: number): glibtop_open_files_entry[];
896
+ function glibtop_get_proc_open_files(buf: glibtop_proc_open_files, pid: never): glibtop_open_files_entry[];
897
897
 
898
898
  /**
899
899
  * @param buf
900
900
  * @param pid
901
901
  */
902
- function glibtop_get_proc_segment(buf: glibtop_proc_segment, pid: number): void;
902
+ function glibtop_get_proc_segment(buf: glibtop_proc_segment, pid: never): void;
903
903
 
904
904
  /**
905
905
  * @param buf
906
906
  * @param pid
907
907
  */
908
- function glibtop_get_proc_signal(buf: glibtop_proc_signal, pid: number): void;
908
+ function glibtop_get_proc_signal(buf: glibtop_proc_signal, pid: never): void;
909
909
 
910
910
  /**
911
911
  * @param buf
912
912
  * @param pid
913
913
  */
914
- function glibtop_get_proc_state(buf: glibtop_proc_state, pid: number): void;
914
+ function glibtop_get_proc_state(buf: glibtop_proc_state, pid: never): void;
915
915
 
916
916
  /**
917
917
  * @param buf
918
918
  * @param pid
919
919
  */
920
- function glibtop_get_proc_time(buf: glibtop_proc_time, pid: number): void;
920
+ function glibtop_get_proc_time(buf: glibtop_proc_time, pid: never): void;
921
921
 
922
922
  /**
923
923
  * @param buf
924
924
  * @param pid
925
925
  */
926
- function glibtop_get_proc_uid(buf: glibtop_proc_uid, pid: number): void;
926
+ function glibtop_get_proc_uid(buf: glibtop_proc_uid, pid: never): void;
927
927
 
928
928
  /**
929
929
  * @param buf
930
930
  * @param pid
931
931
  */
932
- function glibtop_get_proc_wd(buf: glibtop_proc_wd, pid: number): string[];
932
+ function glibtop_get_proc_wd(buf: glibtop_proc_wd, pid: never): string[];
933
933
 
934
934
  /**
935
935
  * @param buf a {@link GTop.glibtop_proclist}
@@ -937,7 +937,7 @@ export namespace GTop {
937
937
  * @param arg an argument specific for the process type
938
938
  * @returns an array of process ids
939
939
  */
940
- function glibtop_get_proclist(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): number[];
940
+ function glibtop_get_proclist(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): never[];
941
941
 
942
942
  /**
943
943
  * @param buf
@@ -1025,15 +1025,15 @@ export namespace GTop {
1025
1025
 
1026
1026
  server_port: number;
1027
1027
 
1028
- pid: number;
1028
+ pid: never;
1029
1029
 
1030
- uid: number;
1030
+ uid: never;
1031
1031
 
1032
- euid: number;
1032
+ euid: never;
1033
1033
 
1034
- gid: number;
1034
+ gid: never;
1035
1035
 
1036
- egid: number;
1036
+ egid: never;
1037
1037
 
1038
1038
  ndisk: number;
1039
1039
 
@@ -1100,94 +1100,94 @@ export namespace GTop {
1100
1100
  * @param buf
1101
1101
  * @param pid
1102
1102
  */
1103
- static get_proc_affinity(buf: glibtop_proc_affinity, pid: number): number;
1103
+ static get_proc_affinity(buf: glibtop_proc_affinity, pid: never): number;
1104
1104
 
1105
1105
  /**
1106
1106
  * @param buf
1107
1107
  * @param pid
1108
1108
  * @param max_len
1109
1109
  */
1110
- static get_proc_args(buf: glibtop_proc_args, pid: number, max_len: number): string;
1110
+ static get_proc_args(buf: glibtop_proc_args, pid: never, max_len: number): string;
1111
1111
 
1112
1112
  /**
1113
1113
  * @param buf
1114
1114
  * @param pid
1115
1115
  * @param max_len
1116
1116
  */
1117
- static get_proc_argv(buf: glibtop_proc_args, pid: number, max_len: number): string[];
1117
+ static get_proc_argv(buf: glibtop_proc_args, pid: never, max_len: number): string[];
1118
1118
 
1119
1119
  /**
1120
1120
  * @param buf
1121
1121
  * @param pid
1122
1122
  */
1123
- static get_proc_io(buf: glibtop_proc_io, pid: number): void;
1123
+ static get_proc_io(buf: glibtop_proc_io, pid: never): void;
1124
1124
 
1125
1125
  /**
1126
1126
  * @param buf
1127
1127
  * @param pid
1128
1128
  */
1129
- static get_proc_kernel(buf: glibtop_proc_kernel, pid: number): void;
1129
+ static get_proc_kernel(buf: glibtop_proc_kernel, pid: never): void;
1130
1130
 
1131
1131
  /**
1132
1132
  * @param buf
1133
1133
  * @param pid
1134
1134
  */
1135
- static get_proc_map(buf: glibtop_proc_map, pid: number): glibtop_map_entry[];
1135
+ static get_proc_map(buf: glibtop_proc_map, pid: never): glibtop_map_entry[];
1136
1136
 
1137
1137
  /**
1138
1138
  * @param buf
1139
1139
  * @param pid
1140
1140
  */
1141
- static get_proc_mem(buf: glibtop_proc_mem, pid: number): void;
1141
+ static get_proc_mem(buf: glibtop_proc_mem, pid: never): void;
1142
1142
 
1143
1143
  /**
1144
1144
  * @param buf
1145
1145
  * @param pid
1146
1146
  */
1147
- static get_proc_open_files(buf: glibtop_proc_open_files, pid: number): glibtop_open_files_entry[];
1147
+ static get_proc_open_files(buf: glibtop_proc_open_files, pid: never): glibtop_open_files_entry[];
1148
1148
 
1149
1149
  /**
1150
1150
  * @param buf
1151
1151
  * @param pid
1152
1152
  */
1153
- static get_proc_segment(buf: glibtop_proc_segment, pid: number): void;
1153
+ static get_proc_segment(buf: glibtop_proc_segment, pid: never): void;
1154
1154
 
1155
1155
  /**
1156
1156
  * @param buf
1157
1157
  * @param pid
1158
1158
  */
1159
- static get_proc_signal(buf: glibtop_proc_signal, pid: number): void;
1159
+ static get_proc_signal(buf: glibtop_proc_signal, pid: never): void;
1160
1160
 
1161
1161
  /**
1162
1162
  * @param buf
1163
1163
  * @param pid
1164
1164
  */
1165
- static get_proc_state(buf: glibtop_proc_state, pid: number): void;
1165
+ static get_proc_state(buf: glibtop_proc_state, pid: never): void;
1166
1166
 
1167
1167
  /**
1168
1168
  * @param buf
1169
1169
  * @param pid
1170
1170
  */
1171
- static get_proc_time(buf: glibtop_proc_time, pid: number): void;
1171
+ static get_proc_time(buf: glibtop_proc_time, pid: never): void;
1172
1172
 
1173
1173
  /**
1174
1174
  * @param buf
1175
1175
  * @param pid
1176
1176
  */
1177
- static get_proc_uid(buf: glibtop_proc_uid, pid: number): void;
1177
+ static get_proc_uid(buf: glibtop_proc_uid, pid: never): void;
1178
1178
 
1179
1179
  /**
1180
1180
  * @param buf
1181
1181
  * @param pid
1182
1182
  */
1183
- static get_proc_wd(buf: glibtop_proc_wd, pid: number): string[];
1183
+ static get_proc_wd(buf: glibtop_proc_wd, pid: never): string[];
1184
1184
 
1185
1185
  /**
1186
1186
  * @param buf a {@link GTop.glibtop_proclist}
1187
1187
  * @param which a #GLIBTOP_* constant specifying process type
1188
1188
  * @param arg an argument specific for the process type
1189
1189
  */
1190
- static get_proclist(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): number[];
1190
+ static get_proclist(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): never[];
1191
1191
 
1192
1192
  /**
1193
1193
  * @param buf
@@ -1380,144 +1380,144 @@ export namespace GTop {
1380
1380
  * @param buf
1381
1381
  * @param pid
1382
1382
  */
1383
- get_proc_affinity_l(buf: glibtop_proc_affinity, pid: number): number;
1383
+ get_proc_affinity_l(buf: glibtop_proc_affinity, pid: never): number;
1384
1384
 
1385
1385
  /**
1386
1386
  * @param buf
1387
1387
  * @param pid
1388
1388
  */
1389
- get_proc_affinity_s(buf: glibtop_proc_affinity, pid: number): number;
1389
+ get_proc_affinity_s(buf: glibtop_proc_affinity, pid: never): number;
1390
1390
 
1391
1391
  /**
1392
1392
  * @param buf
1393
1393
  * @param pid
1394
1394
  * @param max_len
1395
1395
  */
1396
- get_proc_args_l(buf: glibtop_proc_args, pid: number, max_len: number): string;
1396
+ get_proc_args_l(buf: glibtop_proc_args, pid: never, max_len: number): string;
1397
1397
 
1398
1398
  /**
1399
1399
  * @param buf
1400
1400
  * @param pid
1401
1401
  * @param max_len
1402
1402
  */
1403
- get_proc_args_s(buf: glibtop_proc_args, pid: number, max_len: number): string;
1403
+ get_proc_args_s(buf: glibtop_proc_args, pid: never, max_len: number): string;
1404
1404
 
1405
1405
  /**
1406
1406
  * @param buf
1407
1407
  * @param pid
1408
1408
  */
1409
- get_proc_io_l(buf: glibtop_proc_io, pid: number): void;
1409
+ get_proc_io_l(buf: glibtop_proc_io, pid: never): void;
1410
1410
 
1411
1411
  /**
1412
1412
  * @param buf
1413
1413
  * @param pid
1414
1414
  */
1415
- get_proc_io_s(buf: glibtop_proc_io, pid: number): void;
1415
+ get_proc_io_s(buf: glibtop_proc_io, pid: never): void;
1416
1416
 
1417
1417
  /**
1418
1418
  * @param buf
1419
1419
  * @param pid
1420
1420
  */
1421
- get_proc_kernel_l(buf: glibtop_proc_kernel, pid: number): void;
1421
+ get_proc_kernel_l(buf: glibtop_proc_kernel, pid: never): void;
1422
1422
 
1423
1423
  /**
1424
1424
  * @param buf
1425
1425
  * @param pid
1426
1426
  */
1427
- get_proc_kernel_s(buf: glibtop_proc_kernel, pid: number): void;
1427
+ get_proc_kernel_s(buf: glibtop_proc_kernel, pid: never): void;
1428
1428
 
1429
1429
  /**
1430
1430
  * @param pid
1431
1431
  */
1432
- get_proc_map_l(pid: number): [glibtop_map_entry[], glibtop_proc_map];
1432
+ get_proc_map_l(pid: never): [glibtop_map_entry[], glibtop_proc_map];
1433
1433
 
1434
1434
  /**
1435
1435
  * @param pid
1436
1436
  */
1437
- get_proc_map_s(pid: number): [glibtop_map_entry[], glibtop_proc_map];
1437
+ get_proc_map_s(pid: never): [glibtop_map_entry[], glibtop_proc_map];
1438
1438
 
1439
1439
  /**
1440
1440
  * @param buf
1441
1441
  * @param pid
1442
1442
  */
1443
- get_proc_mem_l(buf: glibtop_proc_mem, pid: number): void;
1443
+ get_proc_mem_l(buf: glibtop_proc_mem, pid: never): void;
1444
1444
 
1445
1445
  /**
1446
1446
  * @param buf
1447
1447
  * @param pid
1448
1448
  */
1449
- get_proc_mem_s(buf: glibtop_proc_mem, pid: number): void;
1449
+ get_proc_mem_s(buf: glibtop_proc_mem, pid: never): void;
1450
1450
 
1451
1451
  /**
1452
1452
  * @param pid
1453
1453
  */
1454
- get_proc_open_files_l(pid: number): [glibtop_open_files_entry[], glibtop_proc_open_files];
1454
+ get_proc_open_files_l(pid: never): [glibtop_open_files_entry[], glibtop_proc_open_files];
1455
1455
 
1456
1456
  /**
1457
1457
  * @param buf
1458
1458
  * @param pid
1459
1459
  */
1460
- get_proc_open_files_s(buf: glibtop_proc_open_files, pid: number): glibtop_open_files_entry;
1460
+ get_proc_open_files_s(buf: glibtop_proc_open_files, pid: never): glibtop_open_files_entry;
1461
1461
 
1462
1462
  /**
1463
1463
  * @param buf
1464
1464
  * @param pid
1465
1465
  */
1466
- get_proc_segment_l(buf: glibtop_proc_segment, pid: number): void;
1466
+ get_proc_segment_l(buf: glibtop_proc_segment, pid: never): void;
1467
1467
 
1468
1468
  /**
1469
1469
  * @param buf
1470
1470
  * @param pid
1471
1471
  */
1472
- get_proc_segment_s(buf: glibtop_proc_segment, pid: number): void;
1472
+ get_proc_segment_s(buf: glibtop_proc_segment, pid: never): void;
1473
1473
 
1474
1474
  /**
1475
1475
  * @param buf
1476
1476
  * @param pid
1477
1477
  */
1478
- get_proc_signal_l(buf: glibtop_proc_signal, pid: number): void;
1478
+ get_proc_signal_l(buf: glibtop_proc_signal, pid: never): void;
1479
1479
 
1480
1480
  /**
1481
1481
  * @param buf
1482
1482
  * @param pid
1483
1483
  */
1484
- get_proc_signal_s(buf: glibtop_proc_signal, pid: number): void;
1484
+ get_proc_signal_s(buf: glibtop_proc_signal, pid: never): void;
1485
1485
 
1486
1486
  /**
1487
1487
  * @param buf
1488
1488
  * @param pid
1489
1489
  */
1490
- get_proc_state_l(buf: glibtop_proc_state, pid: number): void;
1490
+ get_proc_state_l(buf: glibtop_proc_state, pid: never): void;
1491
1491
 
1492
1492
  /**
1493
1493
  * @param buf
1494
1494
  * @param pid
1495
1495
  */
1496
- get_proc_state_s(buf: glibtop_proc_state, pid: number): void;
1496
+ get_proc_state_s(buf: glibtop_proc_state, pid: never): void;
1497
1497
 
1498
1498
  /**
1499
1499
  * @param buf
1500
1500
  * @param pid
1501
1501
  */
1502
- get_proc_time_l(buf: glibtop_proc_time, pid: number): void;
1502
+ get_proc_time_l(buf: glibtop_proc_time, pid: never): void;
1503
1503
 
1504
1504
  /**
1505
1505
  * @param buf
1506
1506
  * @param pid
1507
1507
  */
1508
- get_proc_time_s(buf: glibtop_proc_time, pid: number): void;
1508
+ get_proc_time_s(buf: glibtop_proc_time, pid: never): void;
1509
1509
 
1510
1510
  /**
1511
1511
  * @param buf
1512
1512
  * @param pid
1513
1513
  */
1514
- get_proc_uid_l(buf: glibtop_proc_uid, pid: number): void;
1514
+ get_proc_uid_l(buf: glibtop_proc_uid, pid: never): void;
1515
1515
 
1516
1516
  /**
1517
1517
  * @param buf
1518
1518
  * @param pid
1519
1519
  */
1520
- get_proc_uid_s(buf: glibtop_proc_uid, pid: number): void;
1520
+ get_proc_uid_s(buf: glibtop_proc_uid, pid: never): void;
1521
1521
 
1522
1522
  /**
1523
1523
  * @param buf a {@link GTop.glibtop_proclist}
@@ -1525,7 +1525,7 @@ export namespace GTop {
1525
1525
  * @param arg an argument specific for the process type
1526
1526
  * @returns an array of process ids
1527
1527
  */
1528
- get_proclist_l(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): number[];
1528
+ get_proclist_l(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): never[];
1529
1529
 
1530
1530
  /**
1531
1531
  * @param buf a {@link GTop.glibtop_proclist}
@@ -1533,7 +1533,7 @@ export namespace GTop {
1533
1533
  * @param arg an argument specific for the process type
1534
1534
  * @returns an array of process ids
1535
1535
  */
1536
- get_proclist_s(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): number[];
1536
+ get_proclist_s(buf: glibtop_proclist, which: bigint | number, arg: bigint | number): never[];
1537
1537
 
1538
1538
  /**
1539
1539
  * @param buf
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gtop-2.0",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "GJS TypeScript type definitions for GTop-2.0",
5
5
  "type": "module",
6
6
  "module": "gtop-2.0.js",
@@ -31,9 +31,9 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "^4.2.0",
35
- "@girs/gobject-2.0": "^4.2.0",
36
- "@girs/glib-2.0": "^4.2.0" },
34
+ "@girs/gjs": "^4.3.0",
35
+ "@girs/gobject-2.0": "^4.3.0",
36
+ "@girs/glib-2.0": "^4.3.0" },
37
37
  "devDependencies": {
38
38
  "typescript": "*"
39
39
  },