@xylabs/creatable 5.0.83 → 5.0.84
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 +134 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -178,6 +178,8 @@ protected _startPromise: Promisable<boolean> | undefined;
|
|
|
178
178
|
eventData: TEventData;
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
+
Type-level reference to the event data shape for external type queries.
|
|
182
|
+
|
|
181
183
|
### Inherited from
|
|
182
184
|
|
|
183
185
|
```ts
|
|
@@ -998,16 +1000,22 @@ Override in subclasses to define stop behavior. Throw an error on failure.
|
|
|
998
1000
|
clearListeners(eventNames): this;
|
|
999
1001
|
```
|
|
1000
1002
|
|
|
1003
|
+
Removes all listeners for the specified event name(s).
|
|
1004
|
+
|
|
1001
1005
|
### Parameters
|
|
1002
1006
|
|
|
1003
1007
|
#### eventNames
|
|
1004
1008
|
|
|
1009
|
+
One or more event names to clear listeners for.
|
|
1010
|
+
|
|
1005
1011
|
keyof `TEventData` | keyof `TEventData`[]
|
|
1006
1012
|
|
|
1007
1013
|
### Returns
|
|
1008
1014
|
|
|
1009
1015
|
`this`
|
|
1010
1016
|
|
|
1017
|
+
This instance for chaining.
|
|
1018
|
+
|
|
1011
1019
|
### Inherited from
|
|
1012
1020
|
|
|
1013
1021
|
```ts
|
|
@@ -1022,6 +1030,8 @@ BaseEmitter.clearListeners
|
|
|
1022
1030
|
emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
1023
1031
|
```
|
|
1024
1032
|
|
|
1033
|
+
Emits an event, invoking all registered listeners concurrently.
|
|
1034
|
+
|
|
1025
1035
|
### Type Parameters
|
|
1026
1036
|
|
|
1027
1037
|
#### TEventName
|
|
@@ -1038,10 +1048,14 @@ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
1038
1048
|
|
|
1039
1049
|
`TEventName`
|
|
1040
1050
|
|
|
1051
|
+
The event to emit.
|
|
1052
|
+
|
|
1041
1053
|
#### eventArgs
|
|
1042
1054
|
|
|
1043
1055
|
`TEventArgs`
|
|
1044
1056
|
|
|
1057
|
+
The data to pass to listeners.
|
|
1058
|
+
|
|
1045
1059
|
### Returns
|
|
1046
1060
|
|
|
1047
1061
|
`Promise`\<`void`\>
|
|
@@ -1060,6 +1074,8 @@ BaseEmitter.emit
|
|
|
1060
1074
|
emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
1061
1075
|
```
|
|
1062
1076
|
|
|
1077
|
+
Emits an event, invoking all registered listeners sequentially in order.
|
|
1078
|
+
|
|
1063
1079
|
### Type Parameters
|
|
1064
1080
|
|
|
1065
1081
|
#### TEventName
|
|
@@ -1076,10 +1092,14 @@ emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
1076
1092
|
|
|
1077
1093
|
`TEventName`
|
|
1078
1094
|
|
|
1095
|
+
The event to emit.
|
|
1096
|
+
|
|
1079
1097
|
#### eventArgs
|
|
1080
1098
|
|
|
1081
1099
|
`TEventArgs`
|
|
1082
1100
|
|
|
1101
|
+
The data to pass to listeners.
|
|
1102
|
+
|
|
1083
1103
|
### Returns
|
|
1084
1104
|
|
|
1085
1105
|
`Promise`\<`void`\>
|
|
@@ -1098,16 +1118,22 @@ BaseEmitter.emitSerial
|
|
|
1098
1118
|
listenerCount(eventNames): number;
|
|
1099
1119
|
```
|
|
1100
1120
|
|
|
1121
|
+
Returns the total number of listeners registered for the specified event name(s).
|
|
1122
|
+
|
|
1101
1123
|
### Parameters
|
|
1102
1124
|
|
|
1103
1125
|
#### eventNames
|
|
1104
1126
|
|
|
1127
|
+
One or more event names to count listeners for.
|
|
1128
|
+
|
|
1105
1129
|
keyof `TEventData` | keyof `TEventData`[]
|
|
1106
1130
|
|
|
1107
1131
|
### Returns
|
|
1108
1132
|
|
|
1109
1133
|
`number`
|
|
1110
1134
|
|
|
1135
|
+
The total listener count.
|
|
1136
|
+
|
|
1111
1137
|
### Inherited from
|
|
1112
1138
|
|
|
1113
1139
|
```ts
|
|
@@ -1122,6 +1148,8 @@ BaseEmitter.listenerCount
|
|
|
1122
1148
|
off<TEventName>(eventNames, listener): void;
|
|
1123
1149
|
```
|
|
1124
1150
|
|
|
1151
|
+
Removes a specific listener from the specified event name(s).
|
|
1152
|
+
|
|
1125
1153
|
### Type Parameters
|
|
1126
1154
|
|
|
1127
1155
|
#### TEventName
|
|
@@ -1132,12 +1160,16 @@ off<TEventName>(eventNames, listener): void;
|
|
|
1132
1160
|
|
|
1133
1161
|
#### eventNames
|
|
1134
1162
|
|
|
1163
|
+
One or more event names to unsubscribe from.
|
|
1164
|
+
|
|
1135
1165
|
`TEventName` | `TEventName`[]
|
|
1136
1166
|
|
|
1137
1167
|
#### listener
|
|
1138
1168
|
|
|
1139
1169
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
1140
1170
|
|
|
1171
|
+
The listener to remove.
|
|
1172
|
+
|
|
1141
1173
|
### Returns
|
|
1142
1174
|
|
|
1143
1175
|
`void`
|
|
@@ -1156,12 +1188,16 @@ BaseEmitter.off
|
|
|
1156
1188
|
offAny(listener): void;
|
|
1157
1189
|
```
|
|
1158
1190
|
|
|
1191
|
+
Removes a wildcard listener that was receiving all events.
|
|
1192
|
+
|
|
1159
1193
|
### Parameters
|
|
1160
1194
|
|
|
1161
1195
|
#### listener
|
|
1162
1196
|
|
|
1163
1197
|
`EventAnyListener`
|
|
1164
1198
|
|
|
1199
|
+
The wildcard listener to remove.
|
|
1200
|
+
|
|
1165
1201
|
### Returns
|
|
1166
1202
|
|
|
1167
1203
|
`void`
|
|
@@ -1180,6 +1216,8 @@ BaseEmitter.offAny
|
|
|
1180
1216
|
on<TEventName>(eventNames, listener): () => void;
|
|
1181
1217
|
```
|
|
1182
1218
|
|
|
1219
|
+
Subscribes a listener to the specified event name(s).
|
|
1220
|
+
|
|
1183
1221
|
### Type Parameters
|
|
1184
1222
|
|
|
1185
1223
|
#### TEventName
|
|
@@ -1190,14 +1228,20 @@ on<TEventName>(eventNames, listener): () => void;
|
|
|
1190
1228
|
|
|
1191
1229
|
#### eventNames
|
|
1192
1230
|
|
|
1231
|
+
One or more event names to listen for.
|
|
1232
|
+
|
|
1193
1233
|
`TEventName` | `TEventName`[]
|
|
1194
1234
|
|
|
1195
1235
|
#### listener
|
|
1196
1236
|
|
|
1197
1237
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
1198
1238
|
|
|
1239
|
+
The callback to invoke when the event fires.
|
|
1240
|
+
|
|
1199
1241
|
### Returns
|
|
1200
1242
|
|
|
1243
|
+
An unsubscribe function.
|
|
1244
|
+
|
|
1201
1245
|
```ts
|
|
1202
1246
|
(): void;
|
|
1203
1247
|
```
|
|
@@ -1220,14 +1264,20 @@ BaseEmitter.on
|
|
|
1220
1264
|
onAny(listener): () => void;
|
|
1221
1265
|
```
|
|
1222
1266
|
|
|
1267
|
+
Subscribes a wildcard listener that receives all events.
|
|
1268
|
+
|
|
1223
1269
|
### Parameters
|
|
1224
1270
|
|
|
1225
1271
|
#### listener
|
|
1226
1272
|
|
|
1227
1273
|
`EventAnyListener`
|
|
1228
1274
|
|
|
1275
|
+
The callback to invoke for any event.
|
|
1276
|
+
|
|
1229
1277
|
### Returns
|
|
1230
1278
|
|
|
1279
|
+
An unsubscribe function.
|
|
1280
|
+
|
|
1231
1281
|
```ts
|
|
1232
1282
|
(): void;
|
|
1233
1283
|
```
|
|
@@ -1250,6 +1300,8 @@ BaseEmitter.onAny
|
|
|
1250
1300
|
once<TEventName>(eventName, listener): () => void;
|
|
1251
1301
|
```
|
|
1252
1302
|
|
|
1303
|
+
Subscribes a listener that will be invoked only once for the specified event, then automatically removed.
|
|
1304
|
+
|
|
1253
1305
|
### Type Parameters
|
|
1254
1306
|
|
|
1255
1307
|
#### TEventName
|
|
@@ -1262,12 +1314,18 @@ once<TEventName>(eventName, listener): () => void;
|
|
|
1262
1314
|
|
|
1263
1315
|
`TEventName`
|
|
1264
1316
|
|
|
1317
|
+
The event to listen for.
|
|
1318
|
+
|
|
1265
1319
|
#### listener
|
|
1266
1320
|
|
|
1267
1321
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
1268
1322
|
|
|
1323
|
+
The callback to invoke once.
|
|
1324
|
+
|
|
1269
1325
|
### Returns
|
|
1270
1326
|
|
|
1327
|
+
An unsubscribe function.
|
|
1328
|
+
|
|
1271
1329
|
```ts
|
|
1272
1330
|
(): void;
|
|
1273
1331
|
```
|
|
@@ -1401,6 +1459,8 @@ protected _startPromise: Promisable<boolean> | undefined;
|
|
|
1401
1459
|
eventData: TEventData;
|
|
1402
1460
|
```
|
|
1403
1461
|
|
|
1462
|
+
Type-level reference to the event data shape for external type queries.
|
|
1463
|
+
|
|
1404
1464
|
### Inherited from
|
|
1405
1465
|
|
|
1406
1466
|
[`AbstractCreatable`](#AbstractCreatable).[`eventData`](AbstractCreatable.md#eventdata)
|
|
@@ -2312,16 +2372,22 @@ Labels to assign to created instances
|
|
|
2312
2372
|
clearListeners(eventNames): this;
|
|
2313
2373
|
```
|
|
2314
2374
|
|
|
2375
|
+
Removes all listeners for the specified event name(s).
|
|
2376
|
+
|
|
2315
2377
|
### Parameters
|
|
2316
2378
|
|
|
2317
2379
|
#### eventNames
|
|
2318
2380
|
|
|
2381
|
+
One or more event names to clear listeners for.
|
|
2382
|
+
|
|
2319
2383
|
keyof `TEventData` | keyof `TEventData`[]
|
|
2320
2384
|
|
|
2321
2385
|
### Returns
|
|
2322
2386
|
|
|
2323
2387
|
`this`
|
|
2324
2388
|
|
|
2389
|
+
This instance for chaining.
|
|
2390
|
+
|
|
2325
2391
|
### Inherited from
|
|
2326
2392
|
|
|
2327
2393
|
[`AbstractCreatable`](#AbstractCreatable).[`clearListeners`](AbstractCreatable.md#clearlisteners)
|
|
@@ -2334,6 +2400,8 @@ keyof `TEventData` | keyof `TEventData`[]
|
|
|
2334
2400
|
emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
2335
2401
|
```
|
|
2336
2402
|
|
|
2403
|
+
Emits an event, invoking all registered listeners concurrently.
|
|
2404
|
+
|
|
2337
2405
|
### Type Parameters
|
|
2338
2406
|
|
|
2339
2407
|
#### TEventName
|
|
@@ -2350,10 +2418,14 @@ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
2350
2418
|
|
|
2351
2419
|
`TEventName`
|
|
2352
2420
|
|
|
2421
|
+
The event to emit.
|
|
2422
|
+
|
|
2353
2423
|
#### eventArgs
|
|
2354
2424
|
|
|
2355
2425
|
`TEventArgs`
|
|
2356
2426
|
|
|
2427
|
+
The data to pass to listeners.
|
|
2428
|
+
|
|
2357
2429
|
### Returns
|
|
2358
2430
|
|
|
2359
2431
|
`Promise`\<`void`\>
|
|
@@ -2370,6 +2442,8 @@ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
2370
2442
|
emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
2371
2443
|
```
|
|
2372
2444
|
|
|
2445
|
+
Emits an event, invoking all registered listeners sequentially in order.
|
|
2446
|
+
|
|
2373
2447
|
### Type Parameters
|
|
2374
2448
|
|
|
2375
2449
|
#### TEventName
|
|
@@ -2386,10 +2460,14 @@ emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
2386
2460
|
|
|
2387
2461
|
`TEventName`
|
|
2388
2462
|
|
|
2463
|
+
The event to emit.
|
|
2464
|
+
|
|
2389
2465
|
#### eventArgs
|
|
2390
2466
|
|
|
2391
2467
|
`TEventArgs`
|
|
2392
2468
|
|
|
2469
|
+
The data to pass to listeners.
|
|
2470
|
+
|
|
2393
2471
|
### Returns
|
|
2394
2472
|
|
|
2395
2473
|
`Promise`\<`void`\>
|
|
@@ -2406,16 +2484,22 @@ emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
|
|
|
2406
2484
|
listenerCount(eventNames): number;
|
|
2407
2485
|
```
|
|
2408
2486
|
|
|
2487
|
+
Returns the total number of listeners registered for the specified event name(s).
|
|
2488
|
+
|
|
2409
2489
|
### Parameters
|
|
2410
2490
|
|
|
2411
2491
|
#### eventNames
|
|
2412
2492
|
|
|
2493
|
+
One or more event names to count listeners for.
|
|
2494
|
+
|
|
2413
2495
|
keyof `TEventData` | keyof `TEventData`[]
|
|
2414
2496
|
|
|
2415
2497
|
### Returns
|
|
2416
2498
|
|
|
2417
2499
|
`number`
|
|
2418
2500
|
|
|
2501
|
+
The total listener count.
|
|
2502
|
+
|
|
2419
2503
|
### Inherited from
|
|
2420
2504
|
|
|
2421
2505
|
[`AbstractCreatable`](#AbstractCreatable).[`listenerCount`](AbstractCreatable.md#listenercount)
|
|
@@ -2428,6 +2512,8 @@ keyof `TEventData` | keyof `TEventData`[]
|
|
|
2428
2512
|
off<TEventName>(eventNames, listener): void;
|
|
2429
2513
|
```
|
|
2430
2514
|
|
|
2515
|
+
Removes a specific listener from the specified event name(s).
|
|
2516
|
+
|
|
2431
2517
|
### Type Parameters
|
|
2432
2518
|
|
|
2433
2519
|
#### TEventName
|
|
@@ -2438,12 +2524,16 @@ off<TEventName>(eventNames, listener): void;
|
|
|
2438
2524
|
|
|
2439
2525
|
#### eventNames
|
|
2440
2526
|
|
|
2527
|
+
One or more event names to unsubscribe from.
|
|
2528
|
+
|
|
2441
2529
|
`TEventName` | `TEventName`[]
|
|
2442
2530
|
|
|
2443
2531
|
#### listener
|
|
2444
2532
|
|
|
2445
2533
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
2446
2534
|
|
|
2535
|
+
The listener to remove.
|
|
2536
|
+
|
|
2447
2537
|
### Returns
|
|
2448
2538
|
|
|
2449
2539
|
`void`
|
|
@@ -2460,12 +2550,16 @@ off<TEventName>(eventNames, listener): void;
|
|
|
2460
2550
|
offAny(listener): void;
|
|
2461
2551
|
```
|
|
2462
2552
|
|
|
2553
|
+
Removes a wildcard listener that was receiving all events.
|
|
2554
|
+
|
|
2463
2555
|
### Parameters
|
|
2464
2556
|
|
|
2465
2557
|
#### listener
|
|
2466
2558
|
|
|
2467
2559
|
`EventAnyListener`
|
|
2468
2560
|
|
|
2561
|
+
The wildcard listener to remove.
|
|
2562
|
+
|
|
2469
2563
|
### Returns
|
|
2470
2564
|
|
|
2471
2565
|
`void`
|
|
@@ -2482,6 +2576,8 @@ offAny(listener): void;
|
|
|
2482
2576
|
on<TEventName>(eventNames, listener): () => void;
|
|
2483
2577
|
```
|
|
2484
2578
|
|
|
2579
|
+
Subscribes a listener to the specified event name(s).
|
|
2580
|
+
|
|
2485
2581
|
### Type Parameters
|
|
2486
2582
|
|
|
2487
2583
|
#### TEventName
|
|
@@ -2492,14 +2588,20 @@ on<TEventName>(eventNames, listener): () => void;
|
|
|
2492
2588
|
|
|
2493
2589
|
#### eventNames
|
|
2494
2590
|
|
|
2591
|
+
One or more event names to listen for.
|
|
2592
|
+
|
|
2495
2593
|
`TEventName` | `TEventName`[]
|
|
2496
2594
|
|
|
2497
2595
|
#### listener
|
|
2498
2596
|
|
|
2499
2597
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
2500
2598
|
|
|
2599
|
+
The callback to invoke when the event fires.
|
|
2600
|
+
|
|
2501
2601
|
### Returns
|
|
2502
2602
|
|
|
2603
|
+
An unsubscribe function.
|
|
2604
|
+
|
|
2503
2605
|
```ts
|
|
2504
2606
|
(): void;
|
|
2505
2607
|
```
|
|
@@ -2520,14 +2622,20 @@ on<TEventName>(eventNames, listener): () => void;
|
|
|
2520
2622
|
onAny(listener): () => void;
|
|
2521
2623
|
```
|
|
2522
2624
|
|
|
2625
|
+
Subscribes a wildcard listener that receives all events.
|
|
2626
|
+
|
|
2523
2627
|
### Parameters
|
|
2524
2628
|
|
|
2525
2629
|
#### listener
|
|
2526
2630
|
|
|
2527
2631
|
`EventAnyListener`
|
|
2528
2632
|
|
|
2633
|
+
The callback to invoke for any event.
|
|
2634
|
+
|
|
2529
2635
|
### Returns
|
|
2530
2636
|
|
|
2637
|
+
An unsubscribe function.
|
|
2638
|
+
|
|
2531
2639
|
```ts
|
|
2532
2640
|
(): void;
|
|
2533
2641
|
```
|
|
@@ -2548,6 +2656,8 @@ onAny(listener): () => void;
|
|
|
2548
2656
|
once<TEventName>(eventName, listener): () => void;
|
|
2549
2657
|
```
|
|
2550
2658
|
|
|
2659
|
+
Subscribes a listener that will be invoked only once for the specified event, then automatically removed.
|
|
2660
|
+
|
|
2551
2661
|
### Type Parameters
|
|
2552
2662
|
|
|
2553
2663
|
#### TEventName
|
|
@@ -2560,12 +2670,18 @@ once<TEventName>(eventName, listener): () => void;
|
|
|
2560
2670
|
|
|
2561
2671
|
`TEventName`
|
|
2562
2672
|
|
|
2673
|
+
The event to listen for.
|
|
2674
|
+
|
|
2563
2675
|
#### listener
|
|
2564
2676
|
|
|
2565
2677
|
`EventListener`\<`TEventData`\[`TEventName`\]\>
|
|
2566
2678
|
|
|
2679
|
+
The callback to invoke once.
|
|
2680
|
+
|
|
2567
2681
|
### Returns
|
|
2568
2682
|
|
|
2683
|
+
An unsubscribe function.
|
|
2684
|
+
|
|
2569
2685
|
```ts
|
|
2570
2686
|
(): void;
|
|
2571
2687
|
```
|
|
@@ -3129,6 +3245,8 @@ Stops the instance. Resolves to true if stopped successfully.
|
|
|
3129
3245
|
clearListeners(eventNames): void;
|
|
3130
3246
|
```
|
|
3131
3247
|
|
|
3248
|
+
Removes all listeners for the specified event name(s).
|
|
3249
|
+
|
|
3132
3250
|
### Parameters
|
|
3133
3251
|
|
|
3134
3252
|
#### eventNames
|
|
@@ -3153,6 +3271,8 @@ EventEmitter.clearListeners
|
|
|
3153
3271
|
emit<TEventName>(eventName, eventArgs): Promise<void>;
|
|
3154
3272
|
```
|
|
3155
3273
|
|
|
3274
|
+
Emits an event, invoking all registered listeners concurrently.
|
|
3275
|
+
|
|
3156
3276
|
### Type Parameters
|
|
3157
3277
|
|
|
3158
3278
|
#### TEventName
|
|
@@ -3187,6 +3307,8 @@ EventEmitter.emit
|
|
|
3187
3307
|
emitSerial<TEventName>(eventName, eventArgs): Promise<void>;
|
|
3188
3308
|
```
|
|
3189
3309
|
|
|
3310
|
+
Emits an event, invoking all registered listeners sequentially in order.
|
|
3311
|
+
|
|
3190
3312
|
### Type Parameters
|
|
3191
3313
|
|
|
3192
3314
|
#### TEventName
|
|
@@ -3221,6 +3343,8 @@ EventEmitter.emitSerial
|
|
|
3221
3343
|
listenerCount(eventNames): number;
|
|
3222
3344
|
```
|
|
3223
3345
|
|
|
3346
|
+
Returns the total number of listeners registered for the specified event name(s).
|
|
3347
|
+
|
|
3224
3348
|
### Parameters
|
|
3225
3349
|
|
|
3226
3350
|
#### eventNames
|
|
@@ -3245,6 +3369,8 @@ EventEmitter.listenerCount
|
|
|
3245
3369
|
off<TEventName>(eventNames, listener): void;
|
|
3246
3370
|
```
|
|
3247
3371
|
|
|
3372
|
+
Removes a specific listener from the specified event name(s).
|
|
3373
|
+
|
|
3248
3374
|
### Type Parameters
|
|
3249
3375
|
|
|
3250
3376
|
#### TEventName
|
|
@@ -3279,6 +3405,8 @@ EventEmitter.off
|
|
|
3279
3405
|
offAny(listener): void;
|
|
3280
3406
|
```
|
|
3281
3407
|
|
|
3408
|
+
Removes a wildcard listener that was receiving all events.
|
|
3409
|
+
|
|
3282
3410
|
### Parameters
|
|
3283
3411
|
|
|
3284
3412
|
#### listener
|
|
@@ -3303,6 +3431,8 @@ EventEmitter.offAny
|
|
|
3303
3431
|
on<TEventName>(eventNames, listener): EventUnsubscribeFunction;
|
|
3304
3432
|
```
|
|
3305
3433
|
|
|
3434
|
+
Subscribes a listener to the specified event name(s) and returns an unsubscribe function.
|
|
3435
|
+
|
|
3306
3436
|
### Type Parameters
|
|
3307
3437
|
|
|
3308
3438
|
#### TEventName
|
|
@@ -3337,6 +3467,8 @@ EventEmitter.on
|
|
|
3337
3467
|
onAny(listener): EventUnsubscribeFunction;
|
|
3338
3468
|
```
|
|
3339
3469
|
|
|
3470
|
+
Subscribes a wildcard listener that receives all events and returns an unsubscribe function.
|
|
3471
|
+
|
|
3340
3472
|
### Parameters
|
|
3341
3473
|
|
|
3342
3474
|
#### listener
|
|
@@ -3361,6 +3493,8 @@ EventEmitter.onAny
|
|
|
3361
3493
|
once<TEventName>(eventName, listener): EventUnsubscribeFunction;
|
|
3362
3494
|
```
|
|
3363
3495
|
|
|
3496
|
+
Subscribes a listener that will be invoked only once for the specified event, then automatically removed.
|
|
3497
|
+
|
|
3364
3498
|
### Type Parameters
|
|
3365
3499
|
|
|
3366
3500
|
#### TEventName
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/creatable",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.84",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"!**/*.test.*"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@xylabs/assert": "~5.0.
|
|
39
|
-
"@xylabs/base": "~5.0.
|
|
40
|
-
"@xylabs/events": "~5.0.
|
|
41
|
-
"@xylabs/logger": "~5.0.
|
|
42
|
-
"@xylabs/promise": "~5.0.
|
|
43
|
-
"@xylabs/telemetry": "~5.0.
|
|
44
|
-
"@xylabs/typeof": "~5.0.
|
|
38
|
+
"@xylabs/assert": "~5.0.84",
|
|
39
|
+
"@xylabs/base": "~5.0.84",
|
|
40
|
+
"@xylabs/events": "~5.0.84",
|
|
41
|
+
"@xylabs/logger": "~5.0.84",
|
|
42
|
+
"@xylabs/promise": "~5.0.84",
|
|
43
|
+
"@xylabs/telemetry": "~5.0.84",
|
|
44
|
+
"@xylabs/typeof": "~5.0.84",
|
|
45
45
|
"async-mutex": "~0.5.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@xylabs/ts-scripts-yarn3": "~7.4.
|
|
49
|
-
"@xylabs/tsconfig": "~7.4.
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "~7.4.13",
|
|
49
|
+
"@xylabs/tsconfig": "~7.4.13",
|
|
50
50
|
"tslib": "^2.8.1",
|
|
51
51
|
"typescript": "~5.9.3",
|
|
52
52
|
"vitest": "~4.0.18"
|