@xylabs/creatable 4.13.19 → 4.13.21

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
@@ -12,13 +12,3148 @@
12
12
  [![snyk-badge][]][snyk-link]
13
13
  [![socket-badge][]][socket-link]
14
14
 
15
- Version: 4.13.15
16
15
 
17
- Primary SDK for using XYO Protocol 2.0
16
+ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
18
17
 
19
- ## Documentation
18
+ ## API Documentation
19
+
20
+ **@xylabs/creatable**
21
+
22
+ ***
23
+
24
+ ## Classes
25
+
26
+ - [AbstractCreatable](#classes/AbstractCreatable)
27
+ - [AbstractCreatableWithFactory](#classes/AbstractCreatableWithFactory)
28
+ - [Factory](#classes/Factory)
29
+
30
+ ## Interfaces
31
+
32
+ - [CreatableFactory](#interfaces/CreatableFactory)
33
+ - [Creatable](#interfaces/Creatable)
34
+ - [CreatableWithFactory](#interfaces/CreatableWithFactory)
35
+ - [CreatableInstance](#interfaces/CreatableInstance)
36
+ - [CreatableParams](#interfaces/CreatableParams)
37
+ - [CreatableStatusReporter](#interfaces/CreatableStatusReporter)
38
+ - [Labels](#interfaces/Labels)
39
+ - [WithLabels](#interfaces/WithLabels)
40
+ - [WithOptionalLabels](#interfaces/WithOptionalLabels)
41
+
42
+ ## Type Aliases
43
+
44
+ - [CreatableName](#type-aliases/CreatableName)
45
+ - [CreatableStatus](#type-aliases/CreatableStatus)
46
+
47
+ ## Functions
48
+
49
+ - [creatable](#functions/creatable)
50
+ - [creatableFactory](#functions/creatableFactory)
51
+ - [hasAllLabels](#functions/hasAllLabels)
52
+
53
+ ### classes
54
+
55
+ ### <a id="AbstractCreatable"></a>AbstractCreatable
56
+
57
+ [**@xylabs/creatable**](#../README)
58
+
59
+ ***
60
+
61
+ ## Extends
62
+
63
+ - `BaseEmitter`\<`Partial`\<`TParams`\>, `TEventData`\>
64
+
65
+ ## Extended by
66
+
67
+ - [`AbstractCreatableWithFactory`](#AbstractCreatableWithFactory)
68
+
69
+ ## Type Parameters
70
+
71
+ ### TParams
72
+
73
+ `TParams` *extends* [`CreatableParams`](#../interfaces/CreatableParams) = [`CreatableParams`](#../interfaces/CreatableParams)
74
+
75
+ ### TEventData
76
+
77
+ `TEventData` *extends* `EventData` = `EventData`
78
+
79
+ ## Constructors
80
+
81
+ ### Constructor
82
+
83
+ ```ts
84
+ new AbstractCreatable<TParams, TEventData>(key, params): AbstractCreatable<TParams, TEventData>;
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ #### key
90
+
91
+ `unknown`
92
+
93
+ #### params
94
+
95
+ `Partial`\<`TParams`\>
96
+
97
+ ### Returns
98
+
99
+ `AbstractCreatable`\<`TParams`, `TEventData`\>
100
+
101
+ ### Overrides
102
+
103
+ ```ts
104
+ BaseEmitter<Partial<TParams>, TEventData>.constructor
105
+ ```
106
+
107
+ ## Properties
108
+
109
+ ### defaultLogger?
110
+
111
+ ```ts
112
+ static optional defaultLogger: Logger;
113
+ ```
114
+
115
+ ### Inherited from
116
+
117
+ ```ts
118
+ BaseEmitter.defaultLogger
119
+ ```
120
+
121
+ ***
122
+
123
+ ### globalInstances
124
+
125
+ ```ts
126
+ readonly static globalInstances: Record<BaseClassName, WeakRef<Base>[]>;
127
+ ```
128
+
129
+ ### Inherited from
130
+
131
+ ```ts
132
+ BaseEmitter.globalInstances
133
+ ```
134
+
135
+ ***
136
+
137
+ ### globalInstancesCountHistory
138
+
139
+ ```ts
140
+ readonly static globalInstancesCountHistory: Record<BaseClassName, number[]>;
141
+ ```
142
+
143
+ ### Inherited from
144
+
145
+ ```ts
146
+ BaseEmitter.globalInstancesCountHistory
147
+ ```
148
+
149
+ ***
150
+
151
+ ### uniqueName
152
+
153
+ ```ts
154
+ readonly static uniqueName: string;
155
+ ```
156
+
157
+ ### Inherited from
158
+
159
+ ```ts
160
+ BaseEmitter.uniqueName
161
+ ```
162
+
163
+ ***
164
+
165
+ ### defaultLogger?
166
+
167
+ ```ts
168
+ optional defaultLogger: Logger;
169
+ ```
170
+
171
+ ***
172
+
173
+ ### eventData
174
+
175
+ ```ts
176
+ eventData: TEventData;
177
+ ```
178
+
179
+ ### Inherited from
180
+
181
+ ```ts
182
+ BaseEmitter.eventData
183
+ ```
184
+
185
+ ## Accessors
186
+
187
+ ### historyInterval
188
+
189
+ ### Get Signature
190
+
191
+ ```ts
192
+ get static historyInterval(): number;
193
+ ```
194
+
195
+ #### Returns
196
+
197
+ `number`
198
+
199
+ ### Set Signature
200
+
201
+ ```ts
202
+ set static historyInterval(value): void;
203
+ ```
204
+
205
+ #### Parameters
206
+
207
+ ##### value
208
+
209
+ `number`
210
+
211
+ #### Returns
212
+
213
+ `void`
214
+
215
+ ### Inherited from
216
+
217
+ ```ts
218
+ BaseEmitter.historyInterval
219
+ ```
220
+
221
+ ***
222
+
223
+ ### historyTime
224
+
225
+ ### Get Signature
226
+
227
+ ```ts
228
+ get static historyTime(): number;
229
+ ```
230
+
231
+ #### Returns
232
+
233
+ `number`
234
+
235
+ ### Set Signature
236
+
237
+ ```ts
238
+ set static historyTime(value): void;
239
+ ```
240
+
241
+ #### Parameters
242
+
243
+ ##### value
244
+
245
+ `number`
246
+
247
+ #### Returns
248
+
249
+ `void`
250
+
251
+ ### Inherited from
252
+
253
+ ```ts
254
+ BaseEmitter.historyTime
255
+ ```
256
+
257
+ ***
258
+
259
+ ### maxGcFrequency
260
+
261
+ ### Get Signature
262
+
263
+ ```ts
264
+ get static maxGcFrequency(): number;
265
+ ```
266
+
267
+ #### Returns
268
+
269
+ `number`
270
+
271
+ ### Set Signature
272
+
273
+ ```ts
274
+ set static maxGcFrequency(value): void;
275
+ ```
276
+
277
+ #### Parameters
278
+
279
+ ##### value
280
+
281
+ `number`
282
+
283
+ #### Returns
284
+
285
+ `void`
286
+
287
+ ### Inherited from
288
+
289
+ ```ts
290
+ BaseEmitter.maxGcFrequency
291
+ ```
292
+
293
+ ***
294
+
295
+ ### maxHistoryDepth
296
+
297
+ ### Get Signature
298
+
299
+ ```ts
300
+ get static maxHistoryDepth(): number;
301
+ ```
302
+
303
+ #### Returns
304
+
305
+ `number`
306
+
307
+ ### Inherited from
308
+
309
+ ```ts
310
+ BaseEmitter.maxHistoryDepth
311
+ ```
312
+
313
+ ***
314
+
315
+ ### logger
316
+
317
+ ### Get Signature
318
+
319
+ ```ts
320
+ get logger(): undefined | Logger;
321
+ ```
322
+
323
+ #### Returns
324
+
325
+ `undefined` \| `Logger`
326
+
327
+ ### Inherited from
328
+
329
+ ```ts
330
+ BaseEmitter.logger
331
+ ```
332
+
333
+ ***
334
+
335
+ ### meter
336
+
337
+ ### Get Signature
338
+
339
+ ```ts
340
+ get meter(): undefined | Meter;
341
+ ```
342
+
343
+ #### Returns
344
+
345
+ `undefined` \| `Meter`
346
+
347
+ ### Inherited from
348
+
349
+ ```ts
350
+ BaseEmitter.meter
351
+ ```
352
+
353
+ ***
354
+
355
+ ### tracer
356
+
357
+ ### Get Signature
358
+
359
+ ```ts
360
+ get tracer(): undefined | Tracer;
361
+ ```
362
+
363
+ #### Returns
364
+
365
+ `undefined` \| `Tracer`
366
+
367
+ ### Inherited from
368
+
369
+ ```ts
370
+ BaseEmitter.tracer
371
+ ```
372
+
373
+ ***
374
+
375
+ ### name
376
+
377
+ ### Get Signature
378
+
379
+ ```ts
380
+ get name(): string;
381
+ ```
382
+
383
+ #### Returns
384
+
385
+ `string`
386
+
387
+ ***
388
+
389
+ ### params
390
+
391
+ ### Get Signature
392
+
393
+ ```ts
394
+ get params(): TParams;
395
+ ```
396
+
397
+ #### Returns
398
+
399
+ `TParams`
400
+
401
+ ### Overrides
402
+
403
+ ```ts
404
+ BaseEmitter.params
405
+ ```
406
+
407
+ ***
408
+
409
+ ### statusReporter
410
+
411
+ ### Get Signature
412
+
413
+ ```ts
414
+ get statusReporter():
415
+ | undefined
416
+ | CreatableStatusReporter<void>;
417
+ ```
418
+
419
+ #### Returns
420
+
421
+ \| `undefined`
422
+ \| [`CreatableStatusReporter`](#../interfaces/CreatableStatusReporter)\<`void`\>
423
+
424
+ ## Methods
425
+
426
+ ### gc()
427
+
428
+ ### Call Signature
429
+
430
+ ```ts
431
+ static gc(force?): void;
432
+ ```
433
+
434
+ #### Parameters
435
+
436
+ ##### force?
437
+
438
+ `boolean`
439
+
440
+ #### Returns
441
+
442
+ `void`
443
+
444
+ #### Inherited from
445
+
446
+ ```ts
447
+ BaseEmitter.gc
448
+ ```
449
+
450
+ ### Call Signature
451
+
452
+ ```ts
453
+ static gc(className): void;
454
+ ```
455
+
456
+ #### Parameters
457
+
458
+ ##### className
459
+
460
+ `string`
461
+
462
+ #### Returns
463
+
464
+ `void`
465
+
466
+ #### Inherited from
467
+
468
+ ```ts
469
+ BaseEmitter.gc
470
+ ```
471
+
472
+ ***
473
+
474
+ ### instanceCount()
475
+
476
+ ```ts
477
+ static instanceCount(className): number;
478
+ ```
479
+
480
+ ### Parameters
481
+
482
+ #### className
483
+
484
+ `string`
485
+
486
+ ### Returns
487
+
488
+ `number`
489
+
490
+ ### Inherited from
491
+
492
+ ```ts
493
+ BaseEmitter.instanceCount
494
+ ```
495
+
496
+ ***
497
+
498
+ ### instanceCounts()
499
+
500
+ ```ts
501
+ static instanceCounts(): Record<BaseClassName, number>;
502
+ ```
503
+
504
+ ### Returns
505
+
506
+ `Record`\<`BaseClassName`, `number`\>
507
+
508
+ ### Inherited from
509
+
510
+ ```ts
511
+ BaseEmitter.instanceCounts
512
+ ```
513
+
514
+ ***
515
+
516
+ ### startHistory()
517
+
518
+ ```ts
519
+ static startHistory(): void;
520
+ ```
521
+
522
+ ### Returns
523
+
524
+ `void`
525
+
526
+ ### Inherited from
527
+
528
+ ```ts
529
+ BaseEmitter.startHistory
530
+ ```
531
+
532
+ ***
533
+
534
+ ### stopHistory()
535
+
536
+ ```ts
537
+ static stopHistory(): void;
538
+ ```
539
+
540
+ ### Returns
541
+
542
+ `void`
543
+
544
+ ### Inherited from
545
+
546
+ ```ts
547
+ BaseEmitter.stopHistory
548
+ ```
549
+
550
+ ***
551
+
552
+ ### create()
553
+
554
+ ```ts
555
+ static create<T>(this, inParams): Promise<T>;
556
+ ```
557
+
558
+ ### Type Parameters
559
+
560
+ #### T
561
+
562
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
563
+
564
+ ### Parameters
565
+
566
+ #### this
567
+
568
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
569
+
570
+ #### inParams
571
+
572
+ `Partial`\<`T`\[`"params"`\]\> = `{}`
573
+
574
+ ### Returns
575
+
576
+ `Promise`\<`T`\>
577
+
578
+ ***
579
+
580
+ ### createHandler()
581
+
582
+ ```ts
583
+ static createHandler<T>(this, instance): Promisable<T>;
584
+ ```
585
+
586
+ ### Type Parameters
587
+
588
+ #### T
589
+
590
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
591
+
592
+ ### Parameters
593
+
594
+ #### this
595
+
596
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
597
+
598
+ #### instance
599
+
600
+ `T`
601
+
602
+ ### Returns
603
+
604
+ `Promisable`\<`T`\>
605
+
606
+ ***
607
+
608
+ ### paramsHandler()
609
+
610
+ ```ts
611
+ static paramsHandler<T>(this, params): Promisable<T["params"]>;
612
+ ```
613
+
614
+ ### Type Parameters
615
+
616
+ #### T
617
+
618
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
619
+
620
+ ### Parameters
621
+
622
+ #### this
623
+
624
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
625
+
626
+ #### params
627
+
628
+ `Partial`\<`T`\[`"params"`\]\> = `{}`
629
+
630
+ ### Returns
631
+
632
+ `Promisable`\<`T`\[`"params"`\]\>
633
+
634
+ ***
635
+
636
+ ### createHandler()
637
+
638
+ ```ts
639
+ createHandler(): Promisable<void>;
640
+ ```
641
+
642
+ ### Returns
643
+
644
+ `Promisable`\<`void`\>
645
+
646
+ ***
647
+
648
+ ### paramsValidator()
649
+
650
+ ```ts
651
+ paramsValidator(params): TParams;
652
+ ```
653
+
654
+ ### Parameters
655
+
656
+ #### params
657
+
658
+ `Partial`\<`TParams`\>
659
+
660
+ ### Returns
661
+
662
+ `TParams`
663
+
664
+ ***
665
+
666
+ ### start()
667
+
668
+ ```ts
669
+ start(): Promise<boolean>;
670
+ ```
671
+
672
+ ### Returns
673
+
674
+ `Promise`\<`boolean`\>
675
+
676
+ ***
677
+
678
+ ### stop()
679
+
680
+ ```ts
681
+ stop(): Promise<boolean>;
682
+ ```
683
+
684
+ ### Returns
685
+
686
+ `Promise`\<`boolean`\>
687
+
688
+ ***
689
+
690
+ ### \_noOverride()
691
+
692
+ ```ts
693
+ protected _noOverride(functionName): void;
694
+ ```
695
+
696
+ ### Parameters
697
+
698
+ #### functionName
699
+
700
+ `string` = `...`
701
+
702
+ ### Returns
703
+
704
+ `void`
705
+
706
+ ***
707
+
708
+ ### startHandler()
709
+
710
+ ```ts
711
+ protected startHandler(): Promisable<void>;
712
+ ```
713
+
714
+ ### Returns
715
+
716
+ `Promisable`\<`void`\>
717
+
718
+ ***
719
+
720
+ ### stopHandler()
721
+
722
+ ```ts
723
+ protected stopHandler(): Promisable<void>;
724
+ ```
725
+
726
+ ### Returns
727
+
728
+ `Promisable`\<`void`\>
729
+
730
+ ***
731
+
732
+ ### clearListeners()
733
+
734
+ ```ts
735
+ clearListeners(eventNames): this;
736
+ ```
737
+
738
+ ### Parameters
739
+
740
+ #### eventNames
741
+
742
+ keyof `TEventData` | keyof `TEventData`[]
743
+
744
+ ### Returns
745
+
746
+ `this`
747
+
748
+ ### Inherited from
749
+
750
+ ```ts
751
+ BaseEmitter.clearListeners
752
+ ```
753
+
754
+ ***
755
+
756
+ ### emit()
757
+
758
+ ```ts
759
+ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
760
+ ```
761
+
762
+ ### Type Parameters
763
+
764
+ #### TEventName
765
+
766
+ `TEventName` *extends* `string` \| `number` \| `symbol` = keyof `TEventData`
767
+
768
+ #### TEventArgs
769
+
770
+ `TEventArgs` *extends* `EventArgs` = `TEventData`\[`TEventName`\]
771
+
772
+ ### Parameters
773
+
774
+ #### eventName
775
+
776
+ `TEventName`
777
+
778
+ #### eventArgs
779
+
780
+ `TEventArgs`
781
+
782
+ ### Returns
783
+
784
+ `Promise`\<`void`\>
785
+
786
+ ### Inherited from
787
+
788
+ ```ts
789
+ BaseEmitter.emit
790
+ ```
791
+
792
+ ***
793
+
794
+ ### emitSerial()
795
+
796
+ ```ts
797
+ emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
798
+ ```
799
+
800
+ ### Type Parameters
801
+
802
+ #### TEventName
803
+
804
+ `TEventName` *extends* `string` \| `number` \| `symbol` = keyof `TEventData`
805
+
806
+ #### TEventArgs
807
+
808
+ `TEventArgs` *extends* `EventArgs` = `TEventData`\[`TEventName`\]
809
+
810
+ ### Parameters
811
+
812
+ #### eventName
813
+
814
+ `TEventName`
815
+
816
+ #### eventArgs
817
+
818
+ `TEventArgs`
819
+
820
+ ### Returns
821
+
822
+ `Promise`\<`void`\>
823
+
824
+ ### Inherited from
825
+
826
+ ```ts
827
+ BaseEmitter.emitSerial
828
+ ```
829
+
830
+ ***
831
+
832
+ ### listenerCount()
833
+
834
+ ```ts
835
+ listenerCount(eventNames): number;
836
+ ```
837
+
838
+ ### Parameters
839
+
840
+ #### eventNames
841
+
842
+ keyof `TEventData` | keyof `TEventData`[]
843
+
844
+ ### Returns
845
+
846
+ `number`
847
+
848
+ ### Inherited from
849
+
850
+ ```ts
851
+ BaseEmitter.listenerCount
852
+ ```
853
+
854
+ ***
855
+
856
+ ### off()
857
+
858
+ ```ts
859
+ off<TEventName>(eventNames, listener): void;
860
+ ```
861
+
862
+ ### Type Parameters
863
+
864
+ #### TEventName
865
+
866
+ `TEventName` *extends* `string` \| `number` \| `symbol`
867
+
868
+ ### Parameters
869
+
870
+ #### eventNames
871
+
872
+ `TEventName` | `TEventName`[]
873
+
874
+ #### listener
875
+
876
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
877
+
878
+ ### Returns
879
+
880
+ `void`
881
+
882
+ ### Inherited from
883
+
884
+ ```ts
885
+ BaseEmitter.off
886
+ ```
887
+
888
+ ***
889
+
890
+ ### offAny()
891
+
892
+ ```ts
893
+ offAny(listener): void;
894
+ ```
895
+
896
+ ### Parameters
897
+
898
+ #### listener
899
+
900
+ `EventAnyListener`
901
+
902
+ ### Returns
903
+
904
+ `void`
905
+
906
+ ### Inherited from
907
+
908
+ ```ts
909
+ BaseEmitter.offAny
910
+ ```
911
+
912
+ ***
913
+
914
+ ### on()
915
+
916
+ ```ts
917
+ on<TEventName>(eventNames, listener): () => void;
918
+ ```
919
+
920
+ ### Type Parameters
921
+
922
+ #### TEventName
923
+
924
+ `TEventName` *extends* `string` \| `number` \| `symbol`
925
+
926
+ ### Parameters
927
+
928
+ #### eventNames
929
+
930
+ `TEventName` | `TEventName`[]
931
+
932
+ #### listener
933
+
934
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
935
+
936
+ ### Returns
937
+
938
+ ```ts
939
+ (): void;
940
+ ```
941
+
942
+ #### Returns
943
+
944
+ `void`
945
+
946
+ ### Inherited from
947
+
948
+ ```ts
949
+ BaseEmitter.on
950
+ ```
951
+
952
+ ***
953
+
954
+ ### onAny()
955
+
956
+ ```ts
957
+ onAny(listener): () => void;
958
+ ```
959
+
960
+ ### Parameters
961
+
962
+ #### listener
963
+
964
+ `EventAnyListener`
965
+
966
+ ### Returns
967
+
968
+ ```ts
969
+ (): void;
970
+ ```
971
+
972
+ #### Returns
973
+
974
+ `void`
975
+
976
+ ### Inherited from
977
+
978
+ ```ts
979
+ BaseEmitter.onAny
980
+ ```
981
+
982
+ ***
983
+
984
+ ### once()
985
+
986
+ ```ts
987
+ once<TEventName>(eventName, listener): () => void;
988
+ ```
989
+
990
+ ### Type Parameters
991
+
992
+ #### TEventName
993
+
994
+ `TEventName` *extends* `string` \| `number` \| `symbol`
995
+
996
+ ### Parameters
997
+
998
+ #### eventName
999
+
1000
+ `TEventName`
1001
+
1002
+ #### listener
1003
+
1004
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
1005
+
1006
+ ### Returns
1007
+
1008
+ ```ts
1009
+ (): void;
1010
+ ```
1011
+
1012
+ #### Returns
1013
+
1014
+ `void`
1015
+
1016
+ ### Inherited from
1017
+
1018
+ ```ts
1019
+ BaseEmitter.once
1020
+ ```
1021
+
1022
+ ### <a id="AbstractCreatableWithFactory"></a>AbstractCreatableWithFactory
1023
+
1024
+ [**@xylabs/creatable**](#../README)
1025
+
1026
+ ***
1027
+
1028
+ ## Extends
1029
+
1030
+ - [`AbstractCreatable`](#AbstractCreatable)\<`TParams`, `TEventData`\>
1031
+
1032
+ ## Type Parameters
1033
+
1034
+ ### TParams
1035
+
1036
+ `TParams` *extends* [`CreatableParams`](#../interfaces/CreatableParams) = [`CreatableParams`](#../interfaces/CreatableParams)
1037
+
1038
+ ### TEventData
1039
+
1040
+ `TEventData` *extends* `EventData` = `EventData`
1041
+
1042
+ ## Constructors
1043
+
1044
+ ### Constructor
1045
+
1046
+ ```ts
1047
+ new AbstractCreatableWithFactory<TParams, TEventData>(key, params): AbstractCreatableWithFactory<TParams, TEventData>;
1048
+ ```
1049
+
1050
+ ### Parameters
1051
+
1052
+ #### key
1053
+
1054
+ `unknown`
1055
+
1056
+ #### params
1057
+
1058
+ `Partial`\<`TParams`\>
1059
+
1060
+ ### Returns
1061
+
1062
+ `AbstractCreatableWithFactory`\<`TParams`, `TEventData`\>
1063
+
1064
+ ### Inherited from
1065
+
1066
+ [`AbstractCreatable`](#AbstractCreatable).[`constructor`](AbstractCreatable.md#constructor)
1067
+
1068
+ ## Properties
1069
+
1070
+ ### defaultLogger?
1071
+
1072
+ ```ts
1073
+ static optional defaultLogger: Logger;
1074
+ ```
1075
+
1076
+ ### Inherited from
1077
+
1078
+ [`AbstractCreatable`](#AbstractCreatable).[`defaultLogger`](AbstractCreatable.md#defaultlogger)
1079
+
1080
+ ***
1081
+
1082
+ ### globalInstances
1083
+
1084
+ ```ts
1085
+ readonly static globalInstances: Record<BaseClassName, WeakRef<Base>[]>;
1086
+ ```
1087
+
1088
+ ### Inherited from
1089
+
1090
+ [`AbstractCreatable`](#AbstractCreatable).[`globalInstances`](AbstractCreatable.md#globalinstances)
1091
+
1092
+ ***
1093
+
1094
+ ### globalInstancesCountHistory
1095
+
1096
+ ```ts
1097
+ readonly static globalInstancesCountHistory: Record<BaseClassName, number[]>;
1098
+ ```
1099
+
1100
+ ### Inherited from
1101
+
1102
+ [`AbstractCreatable`](#AbstractCreatable).[`globalInstancesCountHistory`](AbstractCreatable.md#globalinstancescounthistory)
1103
+
1104
+ ***
1105
+
1106
+ ### uniqueName
1107
+
1108
+ ```ts
1109
+ readonly static uniqueName: string;
1110
+ ```
1111
+
1112
+ ### Inherited from
1113
+
1114
+ [`AbstractCreatable`](#AbstractCreatable).[`uniqueName`](AbstractCreatable.md#uniquename)
1115
+
1116
+ ***
1117
+
1118
+ ### defaultLogger?
1119
+
1120
+ ```ts
1121
+ optional defaultLogger: Logger;
1122
+ ```
1123
+
1124
+ ### Inherited from
1125
+
1126
+ [`AbstractCreatable`](#AbstractCreatable).[`defaultLogger`](AbstractCreatable.md#defaultlogger-1)
1127
+
1128
+ ***
1129
+
1130
+ ### eventData
1131
+
1132
+ ```ts
1133
+ eventData: TEventData;
1134
+ ```
1135
+
1136
+ ### Inherited from
1137
+
1138
+ [`AbstractCreatable`](#AbstractCreatable).[`eventData`](AbstractCreatable.md#eventdata)
1139
+
1140
+ ## Accessors
1141
+
1142
+ ### historyInterval
1143
+
1144
+ ### Get Signature
1145
+
1146
+ ```ts
1147
+ get static historyInterval(): number;
1148
+ ```
1149
+
1150
+ #### Returns
1151
+
1152
+ `number`
1153
+
1154
+ ### Set Signature
1155
+
1156
+ ```ts
1157
+ set static historyInterval(value): void;
1158
+ ```
1159
+
1160
+ #### Parameters
1161
+
1162
+ ##### value
1163
+
1164
+ `number`
1165
+
1166
+ #### Returns
1167
+
1168
+ `void`
1169
+
1170
+ ### Inherited from
1171
+
1172
+ [`AbstractCreatable`](#AbstractCreatable).[`historyInterval`](AbstractCreatable.md#historyinterval)
1173
+
1174
+ ***
1175
+
1176
+ ### historyTime
1177
+
1178
+ ### Get Signature
1179
+
1180
+ ```ts
1181
+ get static historyTime(): number;
1182
+ ```
1183
+
1184
+ #### Returns
1185
+
1186
+ `number`
1187
+
1188
+ ### Set Signature
1189
+
1190
+ ```ts
1191
+ set static historyTime(value): void;
1192
+ ```
1193
+
1194
+ #### Parameters
1195
+
1196
+ ##### value
1197
+
1198
+ `number`
1199
+
1200
+ #### Returns
1201
+
1202
+ `void`
1203
+
1204
+ ### Inherited from
1205
+
1206
+ [`AbstractCreatable`](#AbstractCreatable).[`historyTime`](AbstractCreatable.md#historytime)
1207
+
1208
+ ***
1209
+
1210
+ ### maxGcFrequency
1211
+
1212
+ ### Get Signature
1213
+
1214
+ ```ts
1215
+ get static maxGcFrequency(): number;
1216
+ ```
1217
+
1218
+ #### Returns
1219
+
1220
+ `number`
1221
+
1222
+ ### Set Signature
1223
+
1224
+ ```ts
1225
+ set static maxGcFrequency(value): void;
1226
+ ```
1227
+
1228
+ #### Parameters
1229
+
1230
+ ##### value
1231
+
1232
+ `number`
1233
+
1234
+ #### Returns
1235
+
1236
+ `void`
1237
+
1238
+ ### Inherited from
1239
+
1240
+ [`AbstractCreatable`](#AbstractCreatable).[`maxGcFrequency`](AbstractCreatable.md#maxgcfrequency)
1241
+
1242
+ ***
1243
+
1244
+ ### maxHistoryDepth
1245
+
1246
+ ### Get Signature
1247
+
1248
+ ```ts
1249
+ get static maxHistoryDepth(): number;
1250
+ ```
1251
+
1252
+ #### Returns
1253
+
1254
+ `number`
1255
+
1256
+ ### Inherited from
1257
+
1258
+ [`AbstractCreatable`](#AbstractCreatable).[`maxHistoryDepth`](AbstractCreatable.md#maxhistorydepth)
1259
+
1260
+ ***
1261
+
1262
+ ### logger
1263
+
1264
+ ### Get Signature
1265
+
1266
+ ```ts
1267
+ get logger(): undefined | Logger;
1268
+ ```
1269
+
1270
+ #### Returns
1271
+
1272
+ `undefined` \| `Logger`
1273
+
1274
+ ### Inherited from
1275
+
1276
+ [`AbstractCreatable`](#AbstractCreatable).[`logger`](AbstractCreatable.md#logger)
1277
+
1278
+ ***
1279
+
1280
+ ### meter
1281
+
1282
+ ### Get Signature
1283
+
1284
+ ```ts
1285
+ get meter(): undefined | Meter;
1286
+ ```
1287
+
1288
+ #### Returns
1289
+
1290
+ `undefined` \| `Meter`
1291
+
1292
+ ### Inherited from
1293
+
1294
+ [`AbstractCreatable`](#AbstractCreatable).[`meter`](AbstractCreatable.md#meter)
1295
+
1296
+ ***
1297
+
1298
+ ### tracer
1299
+
1300
+ ### Get Signature
1301
+
1302
+ ```ts
1303
+ get tracer(): undefined | Tracer;
1304
+ ```
1305
+
1306
+ #### Returns
1307
+
1308
+ `undefined` \| `Tracer`
1309
+
1310
+ ### Inherited from
1311
+
1312
+ [`AbstractCreatable`](#AbstractCreatable).[`tracer`](AbstractCreatable.md#tracer)
1313
+
1314
+ ***
1315
+
1316
+ ### name
1317
+
1318
+ ### Get Signature
1319
+
1320
+ ```ts
1321
+ get name(): string;
1322
+ ```
1323
+
1324
+ #### Returns
1325
+
1326
+ `string`
1327
+
1328
+ ### Inherited from
1329
+
1330
+ [`AbstractCreatable`](#AbstractCreatable).[`name`](AbstractCreatable.md#name)
1331
+
1332
+ ***
1333
+
1334
+ ### params
1335
+
1336
+ ### Get Signature
1337
+
1338
+ ```ts
1339
+ get params(): TParams;
1340
+ ```
1341
+
1342
+ #### Returns
1343
+
1344
+ `TParams`
1345
+
1346
+ ### Inherited from
1347
+
1348
+ [`AbstractCreatable`](#AbstractCreatable).[`params`](AbstractCreatable.md#params)
1349
+
1350
+ ***
1351
+
1352
+ ### statusReporter
1353
+
1354
+ ### Get Signature
1355
+
1356
+ ```ts
1357
+ get statusReporter():
1358
+ | undefined
1359
+ | CreatableStatusReporter<void>;
1360
+ ```
1361
+
1362
+ #### Returns
1363
+
1364
+ \| `undefined`
1365
+ \| [`CreatableStatusReporter`](#../interfaces/CreatableStatusReporter)\<`void`\>
1366
+
1367
+ ### Inherited from
1368
+
1369
+ [`AbstractCreatable`](#AbstractCreatable).[`statusReporter`](AbstractCreatable.md#statusreporter)
1370
+
1371
+ ## Methods
1372
+
1373
+ ### gc()
1374
+
1375
+ ### Call Signature
1376
+
1377
+ ```ts
1378
+ static gc(force?): void;
1379
+ ```
1380
+
1381
+ #### Parameters
1382
+
1383
+ ##### force?
1384
+
1385
+ `boolean`
1386
+
1387
+ #### Returns
1388
+
1389
+ `void`
1390
+
1391
+ #### Inherited from
1392
+
1393
+ [`AbstractCreatable`](#AbstractCreatable).[`gc`](AbstractCreatable.md#gc)
1394
+
1395
+ ### Call Signature
1396
+
1397
+ ```ts
1398
+ static gc(className): void;
1399
+ ```
1400
+
1401
+ #### Parameters
1402
+
1403
+ ##### className
1404
+
1405
+ `string`
1406
+
1407
+ #### Returns
1408
+
1409
+ `void`
1410
+
1411
+ #### Inherited from
1412
+
1413
+ [`AbstractCreatable`](#AbstractCreatable).[`gc`](AbstractCreatable.md#gc)
1414
+
1415
+ ***
1416
+
1417
+ ### instanceCount()
1418
+
1419
+ ```ts
1420
+ static instanceCount(className): number;
1421
+ ```
1422
+
1423
+ ### Parameters
1424
+
1425
+ #### className
1426
+
1427
+ `string`
1428
+
1429
+ ### Returns
1430
+
1431
+ `number`
1432
+
1433
+ ### Inherited from
1434
+
1435
+ [`AbstractCreatable`](#AbstractCreatable).[`instanceCount`](AbstractCreatable.md#instancecount)
1436
+
1437
+ ***
1438
+
1439
+ ### instanceCounts()
1440
+
1441
+ ```ts
1442
+ static instanceCounts(): Record<BaseClassName, number>;
1443
+ ```
1444
+
1445
+ ### Returns
1446
+
1447
+ `Record`\<`BaseClassName`, `number`\>
1448
+
1449
+ ### Inherited from
1450
+
1451
+ [`AbstractCreatable`](#AbstractCreatable).[`instanceCounts`](AbstractCreatable.md#instancecounts)
1452
+
1453
+ ***
1454
+
1455
+ ### startHistory()
1456
+
1457
+ ```ts
1458
+ static startHistory(): void;
1459
+ ```
1460
+
1461
+ ### Returns
1462
+
1463
+ `void`
1464
+
1465
+ ### Inherited from
1466
+
1467
+ [`AbstractCreatable`](#AbstractCreatable).[`startHistory`](AbstractCreatable.md#starthistory)
1468
+
1469
+ ***
1470
+
1471
+ ### stopHistory()
1472
+
1473
+ ```ts
1474
+ static stopHistory(): void;
1475
+ ```
1476
+
1477
+ ### Returns
1478
+
1479
+ `void`
1480
+
1481
+ ### Inherited from
1482
+
1483
+ [`AbstractCreatable`](#AbstractCreatable).[`stopHistory`](AbstractCreatable.md#stophistory)
1484
+
1485
+ ***
1486
+
1487
+ ### create()
1488
+
1489
+ ```ts
1490
+ static create<T>(this, inParams): Promise<T>;
1491
+ ```
1492
+
1493
+ ### Type Parameters
1494
+
1495
+ #### T
1496
+
1497
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
1498
+
1499
+ ### Parameters
1500
+
1501
+ #### this
1502
+
1503
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
1504
+
1505
+ #### inParams
1506
+
1507
+ `Partial`\<`T`\[`"params"`\]\> = `{}`
1508
+
1509
+ ### Returns
1510
+
1511
+ `Promise`\<`T`\>
1512
+
1513
+ ### Inherited from
1514
+
1515
+ [`AbstractCreatable`](#AbstractCreatable).[`create`](AbstractCreatable.md#create)
1516
+
1517
+ ***
1518
+
1519
+ ### createHandler()
1520
+
1521
+ ```ts
1522
+ static createHandler<T>(this, instance): Promisable<T>;
1523
+ ```
1524
+
1525
+ ### Type Parameters
1526
+
1527
+ #### T
1528
+
1529
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
1530
+
1531
+ ### Parameters
1532
+
1533
+ #### this
1534
+
1535
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
1536
+
1537
+ #### instance
1538
+
1539
+ `T`
1540
+
1541
+ ### Returns
1542
+
1543
+ `Promisable`\<`T`\>
1544
+
1545
+ ### Inherited from
1546
+
1547
+ [`AbstractCreatable`](#AbstractCreatable).[`createHandler`](AbstractCreatable.md#createhandler)
1548
+
1549
+ ***
1550
+
1551
+ ### paramsHandler()
1552
+
1553
+ ```ts
1554
+ static paramsHandler<T>(this, params): Promisable<T["params"]>;
1555
+ ```
1556
+
1557
+ ### Type Parameters
1558
+
1559
+ #### T
1560
+
1561
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
1562
+
1563
+ ### Parameters
1564
+
1565
+ #### this
1566
+
1567
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
1568
+
1569
+ #### params
1570
+
1571
+ `Partial`\<`T`\[`"params"`\]\> = `{}`
1572
+
1573
+ ### Returns
1574
+
1575
+ `Promisable`\<`T`\[`"params"`\]\>
1576
+
1577
+ ### Inherited from
1578
+
1579
+ [`AbstractCreatable`](#AbstractCreatable).[`paramsHandler`](AbstractCreatable.md#paramshandler)
1580
+
1581
+ ***
1582
+
1583
+ ### createHandler()
1584
+
1585
+ ```ts
1586
+ createHandler(): Promisable<void>;
1587
+ ```
1588
+
1589
+ ### Returns
1590
+
1591
+ `Promisable`\<`void`\>
1592
+
1593
+ ### Inherited from
1594
+
1595
+ [`AbstractCreatable`](#AbstractCreatable).[`createHandler`](AbstractCreatable.md#createhandler-2)
1596
+
1597
+ ***
1598
+
1599
+ ### paramsValidator()
1600
+
1601
+ ```ts
1602
+ paramsValidator(params): TParams;
1603
+ ```
1604
+
1605
+ ### Parameters
1606
+
1607
+ #### params
1608
+
1609
+ `Partial`\<`TParams`\>
1610
+
1611
+ ### Returns
1612
+
1613
+ `TParams`
1614
+
1615
+ ### Inherited from
1616
+
1617
+ [`AbstractCreatable`](#AbstractCreatable).[`paramsValidator`](AbstractCreatable.md#paramsvalidator)
1618
+
1619
+ ***
1620
+
1621
+ ### start()
1622
+
1623
+ ```ts
1624
+ start(): Promise<boolean>;
1625
+ ```
1626
+
1627
+ ### Returns
1628
+
1629
+ `Promise`\<`boolean`\>
1630
+
1631
+ ### Inherited from
1632
+
1633
+ [`AbstractCreatable`](#AbstractCreatable).[`start`](AbstractCreatable.md#start)
1634
+
1635
+ ***
1636
+
1637
+ ### stop()
1638
+
1639
+ ```ts
1640
+ stop(): Promise<boolean>;
1641
+ ```
1642
+
1643
+ ### Returns
1644
+
1645
+ `Promise`\<`boolean`\>
1646
+
1647
+ ### Inherited from
1648
+
1649
+ [`AbstractCreatable`](#AbstractCreatable).[`stop`](AbstractCreatable.md#stop)
1650
+
1651
+ ***
1652
+
1653
+ ### \_noOverride()
1654
+
1655
+ ```ts
1656
+ protected _noOverride(functionName): void;
1657
+ ```
1658
+
1659
+ ### Parameters
1660
+
1661
+ #### functionName
1662
+
1663
+ `string` = `...`
1664
+
1665
+ ### Returns
1666
+
1667
+ `void`
1668
+
1669
+ ### Inherited from
1670
+
1671
+ [`AbstractCreatable`](#AbstractCreatable).[`_noOverride`](AbstractCreatable.md#_nooverride)
1672
+
1673
+ ***
1674
+
1675
+ ### startHandler()
1676
+
1677
+ ```ts
1678
+ protected startHandler(): Promisable<void>;
1679
+ ```
1680
+
1681
+ ### Returns
1682
+
1683
+ `Promisable`\<`void`\>
1684
+
1685
+ ### Inherited from
1686
+
1687
+ [`AbstractCreatable`](#AbstractCreatable).[`startHandler`](AbstractCreatable.md#starthandler)
1688
+
1689
+ ***
1690
+
1691
+ ### stopHandler()
1692
+
1693
+ ```ts
1694
+ protected stopHandler(): Promisable<void>;
1695
+ ```
1696
+
1697
+ ### Returns
1698
+
1699
+ `Promisable`\<`void`\>
1700
+
1701
+ ### Inherited from
1702
+
1703
+ [`AbstractCreatable`](#AbstractCreatable).[`stopHandler`](AbstractCreatable.md#stophandler)
1704
+
1705
+ ***
1706
+
1707
+ ### factory()
1708
+
1709
+ ```ts
1710
+ static factory<T>(
1711
+ this,
1712
+ params?,
1713
+ labels?): CreatableFactory<T>;
1714
+ ```
1715
+
1716
+ ### Type Parameters
1717
+
1718
+ #### T
1719
+
1720
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
1721
+
1722
+ ### Parameters
1723
+
1724
+ #### this
1725
+
1726
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
1727
+
1728
+ #### params?
1729
+
1730
+ `Partial`\<`T`\[`"params"`\]\>
1731
+
1732
+ #### labels?
1733
+
1734
+ [`Labels`](#../interfaces/Labels)
1735
+
1736
+ ### Returns
1737
+
1738
+ [`CreatableFactory`](#../interfaces/CreatableFactory)\<`T`\>
1739
+
1740
+ ***
1741
+
1742
+ ### clearListeners()
1743
+
1744
+ ```ts
1745
+ clearListeners(eventNames): this;
1746
+ ```
1747
+
1748
+ ### Parameters
1749
+
1750
+ #### eventNames
1751
+
1752
+ keyof `TEventData` | keyof `TEventData`[]
1753
+
1754
+ ### Returns
1755
+
1756
+ `this`
1757
+
1758
+ ### Inherited from
1759
+
1760
+ [`AbstractCreatable`](#AbstractCreatable).[`clearListeners`](AbstractCreatable.md#clearlisteners)
1761
+
1762
+ ***
1763
+
1764
+ ### emit()
1765
+
1766
+ ```ts
1767
+ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
1768
+ ```
1769
+
1770
+ ### Type Parameters
1771
+
1772
+ #### TEventName
1773
+
1774
+ `TEventName` *extends* `string` \| `number` \| `symbol` = keyof `TEventData`
1775
+
1776
+ #### TEventArgs
1777
+
1778
+ `TEventArgs` *extends* `EventArgs` = `TEventData`\[`TEventName`\]
1779
+
1780
+ ### Parameters
1781
+
1782
+ #### eventName
1783
+
1784
+ `TEventName`
1785
+
1786
+ #### eventArgs
1787
+
1788
+ `TEventArgs`
1789
+
1790
+ ### Returns
1791
+
1792
+ `Promise`\<`void`\>
1793
+
1794
+ ### Inherited from
1795
+
1796
+ [`AbstractCreatable`](#AbstractCreatable).[`emit`](AbstractCreatable.md#emit)
1797
+
1798
+ ***
1799
+
1800
+ ### emitSerial()
1801
+
1802
+ ```ts
1803
+ emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
1804
+ ```
1805
+
1806
+ ### Type Parameters
1807
+
1808
+ #### TEventName
1809
+
1810
+ `TEventName` *extends* `string` \| `number` \| `symbol` = keyof `TEventData`
1811
+
1812
+ #### TEventArgs
1813
+
1814
+ `TEventArgs` *extends* `EventArgs` = `TEventData`\[`TEventName`\]
1815
+
1816
+ ### Parameters
1817
+
1818
+ #### eventName
1819
+
1820
+ `TEventName`
1821
+
1822
+ #### eventArgs
1823
+
1824
+ `TEventArgs`
1825
+
1826
+ ### Returns
1827
+
1828
+ `Promise`\<`void`\>
1829
+
1830
+ ### Inherited from
1831
+
1832
+ [`AbstractCreatable`](#AbstractCreatable).[`emitSerial`](AbstractCreatable.md#emitserial)
1833
+
1834
+ ***
1835
+
1836
+ ### listenerCount()
1837
+
1838
+ ```ts
1839
+ listenerCount(eventNames): number;
1840
+ ```
1841
+
1842
+ ### Parameters
1843
+
1844
+ #### eventNames
1845
+
1846
+ keyof `TEventData` | keyof `TEventData`[]
1847
+
1848
+ ### Returns
1849
+
1850
+ `number`
1851
+
1852
+ ### Inherited from
1853
+
1854
+ [`AbstractCreatable`](#AbstractCreatable).[`listenerCount`](AbstractCreatable.md#listenercount)
1855
+
1856
+ ***
1857
+
1858
+ ### off()
1859
+
1860
+ ```ts
1861
+ off<TEventName>(eventNames, listener): void;
1862
+ ```
1863
+
1864
+ ### Type Parameters
1865
+
1866
+ #### TEventName
1867
+
1868
+ `TEventName` *extends* `string` \| `number` \| `symbol`
1869
+
1870
+ ### Parameters
1871
+
1872
+ #### eventNames
1873
+
1874
+ `TEventName` | `TEventName`[]
1875
+
1876
+ #### listener
1877
+
1878
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
1879
+
1880
+ ### Returns
1881
+
1882
+ `void`
1883
+
1884
+ ### Inherited from
1885
+
1886
+ [`AbstractCreatable`](#AbstractCreatable).[`off`](AbstractCreatable.md#off)
1887
+
1888
+ ***
1889
+
1890
+ ### offAny()
1891
+
1892
+ ```ts
1893
+ offAny(listener): void;
1894
+ ```
1895
+
1896
+ ### Parameters
1897
+
1898
+ #### listener
1899
+
1900
+ `EventAnyListener`
1901
+
1902
+ ### Returns
1903
+
1904
+ `void`
1905
+
1906
+ ### Inherited from
1907
+
1908
+ [`AbstractCreatable`](#AbstractCreatable).[`offAny`](AbstractCreatable.md#offany)
1909
+
1910
+ ***
1911
+
1912
+ ### on()
1913
+
1914
+ ```ts
1915
+ on<TEventName>(eventNames, listener): () => void;
1916
+ ```
1917
+
1918
+ ### Type Parameters
1919
+
1920
+ #### TEventName
1921
+
1922
+ `TEventName` *extends* `string` \| `number` \| `symbol`
1923
+
1924
+ ### Parameters
1925
+
1926
+ #### eventNames
1927
+
1928
+ `TEventName` | `TEventName`[]
1929
+
1930
+ #### listener
1931
+
1932
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
1933
+
1934
+ ### Returns
1935
+
1936
+ ```ts
1937
+ (): void;
1938
+ ```
1939
+
1940
+ #### Returns
1941
+
1942
+ `void`
1943
+
1944
+ ### Inherited from
1945
+
1946
+ [`AbstractCreatable`](#AbstractCreatable).[`on`](AbstractCreatable.md#on)
1947
+
1948
+ ***
1949
+
1950
+ ### onAny()
1951
+
1952
+ ```ts
1953
+ onAny(listener): () => void;
1954
+ ```
1955
+
1956
+ ### Parameters
1957
+
1958
+ #### listener
1959
+
1960
+ `EventAnyListener`
1961
+
1962
+ ### Returns
1963
+
1964
+ ```ts
1965
+ (): void;
1966
+ ```
1967
+
1968
+ #### Returns
1969
+
1970
+ `void`
1971
+
1972
+ ### Inherited from
1973
+
1974
+ [`AbstractCreatable`](#AbstractCreatable).[`onAny`](AbstractCreatable.md#onany)
1975
+
1976
+ ***
1977
+
1978
+ ### once()
1979
+
1980
+ ```ts
1981
+ once<TEventName>(eventName, listener): () => void;
1982
+ ```
1983
+
1984
+ ### Type Parameters
1985
+
1986
+ #### TEventName
1987
+
1988
+ `TEventName` *extends* `string` \| `number` \| `symbol`
1989
+
1990
+ ### Parameters
1991
+
1992
+ #### eventName
1993
+
1994
+ `TEventName`
1995
+
1996
+ #### listener
1997
+
1998
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
1999
+
2000
+ ### Returns
2001
+
2002
+ ```ts
2003
+ (): void;
2004
+ ```
2005
+
2006
+ #### Returns
2007
+
2008
+ `void`
2009
+
2010
+ ### Inherited from
2011
+
2012
+ [`AbstractCreatable`](#AbstractCreatable).[`once`](AbstractCreatable.md#once)
2013
+
2014
+ ### <a id="Factory"></a>Factory
2015
+
2016
+ [**@xylabs/creatable**](#../README)
2017
+
2018
+ ***
2019
+
2020
+ ## Type Parameters
2021
+
2022
+ ### T
2023
+
2024
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance) = [`CreatableInstance`](#../interfaces/CreatableInstance)
2025
+
2026
+ ## Implements
2027
+
2028
+ - [`CreatableFactory`](#../interfaces/CreatableFactory)\<`T`\>
2029
+
2030
+ ## Constructors
2031
+
2032
+ ### Constructor
2033
+
2034
+ ```ts
2035
+ new Factory<T>(
2036
+ creatable,
2037
+ params?,
2038
+ labels?): Factory<T>;
2039
+ ```
2040
+
2041
+ ### Parameters
2042
+
2043
+ #### creatable
2044
+
2045
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
2046
+
2047
+ #### params?
2048
+
2049
+ `Partial`\<`T`\[`"params"`\]\>
2050
+
2051
+ #### labels?
2052
+
2053
+ [`Labels`](#../interfaces/Labels) = `{}`
2054
+
2055
+ ### Returns
2056
+
2057
+ `Factory`\<`T`\>
2058
+
2059
+ ## Properties
2060
+
2061
+ ### creatable
2062
+
2063
+ ```ts
2064
+ creatable: Creatable<T>;
2065
+ ```
2066
+
2067
+ ***
2068
+
2069
+ ### defaultParams?
2070
+
2071
+ ```ts
2072
+ optional defaultParams: Partial<T["params"]>;
2073
+ ```
2074
+
2075
+ ***
2076
+
2077
+ ### labels?
2078
+
2079
+ ```ts
2080
+ optional labels: Labels;
2081
+ ```
2082
+
2083
+ ## Methods
2084
+
2085
+ ### withParams()
2086
+
2087
+ ```ts
2088
+ static withParams<T>(
2089
+ creatableModule,
2090
+ params?,
2091
+ labels?): Factory<T>;
2092
+ ```
2093
+
2094
+ ### Type Parameters
2095
+
2096
+ #### T
2097
+
2098
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
2099
+
2100
+ ### Parameters
2101
+
2102
+ #### creatableModule
2103
+
2104
+ [`Creatable`](#../interfaces/Creatable)\<`T`\>
2105
+
2106
+ #### params?
2107
+
2108
+ `Partial`\<`T`\[`"params"`\]\>
2109
+
2110
+ #### labels?
2111
+
2112
+ [`Labels`](#../interfaces/Labels) = `{}`
2113
+
2114
+ ### Returns
2115
+
2116
+ `Factory`\<`T`\>
2117
+
2118
+ ***
2119
+
2120
+ ### create()
2121
+
2122
+ ```ts
2123
+ create(params?): Promise<T>;
2124
+ ```
2125
+
2126
+ ### Parameters
2127
+
2128
+ #### params?
2129
+
2130
+ `Partial`\<`T`\[`"params"`\]\>
2131
+
2132
+ ### Returns
2133
+
2134
+ `Promise`\<`T`\>
2135
+
2136
+ ### Implementation of
2137
+
2138
+ [`CreatableFactory`](#../interfaces/CreatableFactory).[`create`](../interfaces/CreatableFactory.md#create)
2139
+
2140
+ ### functions
2141
+
2142
+ ### <a id="creatable"></a>creatable
2143
+
2144
+ [**@xylabs/creatable**](#../README)
2145
+
2146
+ ***
2147
+
2148
+ ```ts
2149
+ function creatable<T>(): <U>(constructor) => void;
2150
+ ```
2151
+
2152
+ Class annotation to be used to decorate Modules which support
2153
+ an asynchronous creation pattern
2154
+
2155
+ ## Type Parameters
2156
+
2157
+ ### T
2158
+
2159
+ `T` *extends* [`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>
2160
+
2161
+ ## Returns
2162
+
2163
+ The decorated Module requiring it implement the members
2164
+ of the CreatableModule as statics properties/methods
2165
+
2166
+ ```ts
2167
+ <U>(constructor): void;
2168
+ ```
2169
+
2170
+ ### Type Parameters
2171
+
2172
+ ### U
2173
+
2174
+ `U` *extends* [`Creatable`](#../interfaces/Creatable)\<`T`\>
2175
+
2176
+ ### Parameters
2177
+
2178
+ ### constructor
2179
+
2180
+ `U`
2181
+
2182
+ ### Returns
2183
+
2184
+ `void`
2185
+
2186
+ ### <a id="creatableFactory"></a>creatableFactory
2187
+
2188
+ [**@xylabs/creatable**](#../README)
2189
+
2190
+ ***
2191
+
2192
+ ```ts
2193
+ function creatableFactory(): <U>(constructor) => void;
2194
+ ```
2195
+
2196
+ Class annotation to be used to decorate Modules which support
2197
+ an asynchronous creation factory pattern
2198
+
2199
+ ## Returns
2200
+
2201
+ The decorated Module requiring it implement the members
2202
+ of the CreatableModule as statics properties/methods
2203
+
2204
+ ```ts
2205
+ <U>(constructor): void;
2206
+ ```
2207
+
2208
+ ### Type Parameters
2209
+
2210
+ ### U
2211
+
2212
+ `U` *extends* [`CreatableFactory`](#../interfaces/CreatableFactory)\<[`CreatableInstance`](#../interfaces/CreatableInstance)\<[`CreatableParams`](#../interfaces/CreatableParams), `EventData`\>\>
2213
+
2214
+ ### Parameters
2215
+
2216
+ ### constructor
2217
+
2218
+ `U`
2219
+
2220
+ ### Returns
2221
+
2222
+ `void`
2223
+
2224
+ ### <a id="hasAllLabels"></a>hasAllLabels
2225
+
2226
+ [**@xylabs/creatable**](#../README)
2227
+
2228
+ ***
2229
+
2230
+ ```ts
2231
+ function hasAllLabels(source?, required?): boolean;
2232
+ ```
2233
+
2234
+ Returns true if the source object has all the labels from the required set
2235
+
2236
+ ## Parameters
2237
+
2238
+ ### source?
2239
+
2240
+ [`Labels`](#../interfaces/Labels)
2241
+
2242
+ Source object to check against
2243
+
2244
+ ### required?
2245
+
2246
+ [`Labels`](#../interfaces/Labels)
2247
+
2248
+ Set of labels to check for in source
2249
+
2250
+ ## Returns
2251
+
2252
+ `boolean`
2253
+
2254
+ True of the source object has all the labels from the required set
2255
+
2256
+ ### interfaces
2257
+
2258
+ ### <a id="Creatable"></a>Creatable
2259
+
2260
+ [**@xylabs/creatable**](#../README)
2261
+
2262
+ ***
2263
+
2264
+ ## Extended by
2265
+
2266
+ - [`CreatableWithFactory`](#CreatableWithFactory)
2267
+
2268
+ ## Type Parameters
2269
+
2270
+ ### T
2271
+
2272
+ `T` *extends* [`CreatableInstance`](#CreatableInstance) = [`CreatableInstance`](#CreatableInstance)
2273
+
2274
+ ## Constructors
2275
+
2276
+ ### Constructor
2277
+
2278
+ ```ts
2279
+ new Creatable(key, params): T & AbstractCreatable<T["params"], EventData>;
2280
+ ```
2281
+
2282
+ ### Parameters
2283
+
2284
+ #### key
2285
+
2286
+ `unknown`
2287
+
2288
+ #### params
2289
+
2290
+ `Partial`\<[`CreatableParams`](#CreatableParams)\>
2291
+
2292
+ ### Returns
2293
+
2294
+ `T` & [`AbstractCreatable`](#../classes/AbstractCreatable)\<`T`\[`"params"`\], `EventData`\>
2295
+
2296
+ ## Properties
2297
+
2298
+ ### defaultLogger?
2299
+
2300
+ ```ts
2301
+ optional defaultLogger: Logger;
2302
+ ```
2303
+
2304
+ ## Methods
2305
+
2306
+ ### create()
2307
+
2308
+ ```ts
2309
+ create<T>(this, params?): Promise<T>;
2310
+ ```
2311
+
2312
+ ### Type Parameters
2313
+
2314
+ #### T
2315
+
2316
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
2317
+
2318
+ ### Parameters
2319
+
2320
+ #### this
2321
+
2322
+ `Creatable`\<`T`\>
2323
+
2324
+ #### params?
2325
+
2326
+ `Partial`\<`T`\[`"params"`\]\>
2327
+
2328
+ ### Returns
2329
+
2330
+ `Promise`\<`T`\>
2331
+
2332
+ ***
2333
+
2334
+ ### createHandler()
2335
+
2336
+ ```ts
2337
+ createHandler<T>(this, instance): Promisable<T>;
2338
+ ```
2339
+
2340
+ ### Type Parameters
2341
+
2342
+ #### T
2343
+
2344
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
2345
+
2346
+ ### Parameters
2347
+
2348
+ #### this
2349
+
2350
+ `Creatable`\<`T`\>
2351
+
2352
+ #### instance
2353
+
2354
+ `T`
2355
+
2356
+ ### Returns
2357
+
2358
+ `Promisable`\<`T`\>
2359
+
2360
+ ***
2361
+
2362
+ ### paramsHandler()
2363
+
2364
+ ```ts
2365
+ paramsHandler<T>(this, params?): Promisable<T["params"]>;
2366
+ ```
2367
+
2368
+ ### Type Parameters
2369
+
2370
+ #### T
2371
+
2372
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
2373
+
2374
+ ### Parameters
2375
+
2376
+ #### this
2377
+
2378
+ `Creatable`\<`T`\>
2379
+
2380
+ #### params?
2381
+
2382
+ `Partial`\<`T`\[`"params"`\]\>
2383
+
2384
+ ### Returns
2385
+
2386
+ `Promisable`\<`T`\[`"params"`\]\>
2387
+
2388
+ ### <a id="CreatableFactory"></a>CreatableFactory
2389
+
2390
+ [**@xylabs/creatable**](#../README)
2391
+
2392
+ ***
2393
+
2394
+ ## Extends
2395
+
2396
+ - `Omit`\<[`Creatable`](#Creatable)\<`T`\>,
2397
+ \| `"create"`
2398
+ \| `"createHandler"`
2399
+ \| `"paramsHandler"`
2400
+ \| `"defaultLogger"`
2401
+ \| `"factory"`\>
2402
+
2403
+ ## Type Parameters
2404
+
2405
+ ### T
2406
+
2407
+ `T` *extends* [`CreatableInstance`](#CreatableInstance) = [`CreatableInstance`](#CreatableInstance)
2408
+
2409
+ ## Methods
2410
+
2411
+ ### create()
2412
+
2413
+ ```ts
2414
+ create(this, params?): Promise<T>;
2415
+ ```
2416
+
2417
+ ### Parameters
2418
+
2419
+ #### this
2420
+
2421
+ `CreatableFactory`\<`T`\>
2422
+
2423
+ #### params?
2424
+
2425
+ `Partial`\<`T`\[`"params"`\]\>
2426
+
2427
+ ### Returns
2428
+
2429
+ `Promise`\<`T`\>
2430
+
2431
+ ### <a id="CreatableInstance"></a>CreatableInstance
2432
+
2433
+ [**@xylabs/creatable**](#../README)
2434
+
2435
+ ***
2436
+
2437
+ ## Extends
2438
+
2439
+ - `EventEmitter`\<`TEventData`\>
2440
+
2441
+ ## Type Parameters
2442
+
2443
+ ### TParams
2444
+
2445
+ `TParams` *extends* [`CreatableParams`](#CreatableParams) = [`CreatableParams`](#CreatableParams)
2446
+
2447
+ ### TEventData
2448
+
2449
+ `TEventData` *extends* `EventData` = `EventData`
2450
+
2451
+ ## Properties
2452
+
2453
+ ### eventData
2454
+
2455
+ ```ts
2456
+ eventData: TEventData;
2457
+ ```
2458
+
2459
+ ### Overrides
2460
+
2461
+ ```ts
2462
+ EventEmitter.eventData
2463
+ ```
2464
+
2465
+ ***
2466
+
2467
+ ### name
2468
+
2469
+ ```ts
2470
+ name: string;
2471
+ ```
2472
+
2473
+ ***
2474
+
2475
+ ### params
2476
+
2477
+ ```ts
2478
+ params: TParams;
2479
+ ```
2480
+
2481
+ ## Methods
2482
+
2483
+ ### clearListeners()
2484
+
2485
+ ```ts
2486
+ clearListeners(eventNames): void;
2487
+ ```
2488
+
2489
+ ### Parameters
2490
+
2491
+ #### eventNames
2492
+
2493
+ keyof `TEventData` | keyof `TEventData`[]
2494
+
2495
+ ### Returns
2496
+
2497
+ `void`
2498
+
2499
+ ### Inherited from
2500
+
2501
+ ```ts
2502
+ EventEmitter.clearListeners
2503
+ ```
2504
+
2505
+ ***
2506
+
2507
+ ### emit()
2508
+
2509
+ ```ts
2510
+ emit<TEventName>(eventName, eventArgs): Promise<void>;
2511
+ ```
2512
+
2513
+ ### Type Parameters
2514
+
2515
+ #### TEventName
2516
+
2517
+ `TEventName` *extends* `string` \| `number` \| `symbol`
2518
+
2519
+ ### Parameters
2520
+
2521
+ #### eventName
2522
+
2523
+ `TEventName`
2524
+
2525
+ #### eventArgs
2526
+
2527
+ `TEventData`\[`TEventName`\]
2528
+
2529
+ ### Returns
2530
+
2531
+ `Promise`\<`void`\>
2532
+
2533
+ ### Inherited from
2534
+
2535
+ ```ts
2536
+ EventEmitter.emit
2537
+ ```
2538
+
2539
+ ***
2540
+
2541
+ ### emitSerial()
2542
+
2543
+ ```ts
2544
+ emitSerial<TEventName>(eventName, eventArgs): Promise<void>;
2545
+ ```
2546
+
2547
+ ### Type Parameters
2548
+
2549
+ #### TEventName
2550
+
2551
+ `TEventName` *extends* `string` \| `number` \| `symbol`
2552
+
2553
+ ### Parameters
2554
+
2555
+ #### eventName
2556
+
2557
+ `TEventName`
2558
+
2559
+ #### eventArgs
2560
+
2561
+ `TEventData`\[`TEventName`\]
2562
+
2563
+ ### Returns
2564
+
2565
+ `Promise`\<`void`\>
2566
+
2567
+ ### Inherited from
2568
+
2569
+ ```ts
2570
+ EventEmitter.emitSerial
2571
+ ```
2572
+
2573
+ ***
2574
+
2575
+ ### listenerCount()
2576
+
2577
+ ```ts
2578
+ listenerCount(eventNames): number;
2579
+ ```
2580
+
2581
+ ### Parameters
2582
+
2583
+ #### eventNames
2584
+
2585
+ keyof `TEventData` | keyof `TEventData`[]
2586
+
2587
+ ### Returns
2588
+
2589
+ `number`
2590
+
2591
+ ### Inherited from
2592
+
2593
+ ```ts
2594
+ EventEmitter.listenerCount
2595
+ ```
2596
+
2597
+ ***
2598
+
2599
+ ### off()
2600
+
2601
+ ```ts
2602
+ off<TEventName>(eventNames, listener): void;
2603
+ ```
2604
+
2605
+ ### Type Parameters
2606
+
2607
+ #### TEventName
2608
+
2609
+ `TEventName` *extends* `string` \| `number` \| `symbol`
2610
+
2611
+ ### Parameters
2612
+
2613
+ #### eventNames
2614
+
2615
+ `TEventName` | `TEventName`[]
2616
+
2617
+ #### listener
2618
+
2619
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
2620
+
2621
+ ### Returns
2622
+
2623
+ `void`
2624
+
2625
+ ### Inherited from
2626
+
2627
+ ```ts
2628
+ EventEmitter.off
2629
+ ```
2630
+
2631
+ ***
2632
+
2633
+ ### offAny()
2634
+
2635
+ ```ts
2636
+ offAny(listener): void;
2637
+ ```
2638
+
2639
+ ### Parameters
2640
+
2641
+ #### listener
2642
+
2643
+ `Promise`\<`void`\> | `EventAnyListener`
2644
+
2645
+ ### Returns
2646
+
2647
+ `void`
2648
+
2649
+ ### Inherited from
2650
+
2651
+ ```ts
2652
+ EventEmitter.offAny
2653
+ ```
2654
+
2655
+ ***
2656
+
2657
+ ### on()
2658
+
2659
+ ```ts
2660
+ on<TEventName>(eventNames, listener): EventUnsubscribeFunction;
2661
+ ```
2662
+
2663
+ ### Type Parameters
2664
+
2665
+ #### TEventName
2666
+
2667
+ `TEventName` *extends* `string` \| `number` \| `symbol`
2668
+
2669
+ ### Parameters
2670
+
2671
+ #### eventNames
2672
+
2673
+ `TEventName` | `TEventName`[]
2674
+
2675
+ #### listener
2676
+
2677
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
2678
+
2679
+ ### Returns
2680
+
2681
+ `EventUnsubscribeFunction`
2682
+
2683
+ ### Inherited from
2684
+
2685
+ ```ts
2686
+ EventEmitter.on
2687
+ ```
2688
+
2689
+ ***
2690
+
2691
+ ### onAny()
2692
+
2693
+ ```ts
2694
+ onAny(listener): EventUnsubscribeFunction;
2695
+ ```
2696
+
2697
+ ### Parameters
2698
+
2699
+ #### listener
2700
+
2701
+ `EventAnyListener`
2702
+
2703
+ ### Returns
2704
+
2705
+ `EventUnsubscribeFunction`
2706
+
2707
+ ### Inherited from
2708
+
2709
+ ```ts
2710
+ EventEmitter.onAny
2711
+ ```
2712
+
2713
+ ***
2714
+
2715
+ ### once()
2716
+
2717
+ ```ts
2718
+ once<TEventName>(eventName, listener): EventUnsubscribeFunction;
2719
+ ```
2720
+
2721
+ ### Type Parameters
2722
+
2723
+ #### TEventName
2724
+
2725
+ `TEventName` *extends* `string` \| `number` \| `symbol`
2726
+
2727
+ ### Parameters
2728
+
2729
+ #### eventName
2730
+
2731
+ `TEventName`
2732
+
2733
+ #### listener
2734
+
2735
+ `EventListener`\<`TEventData`\[`TEventName`\]\>
2736
+
2737
+ ### Returns
2738
+
2739
+ `EventUnsubscribeFunction`
2740
+
2741
+ ### Inherited from
2742
+
2743
+ ```ts
2744
+ EventEmitter.once
2745
+ ```
2746
+
2747
+ ### <a id="CreatableParams"></a>CreatableParams
2748
+
2749
+ [**@xylabs/creatable**](#../README)
2750
+
2751
+ ***
2752
+
2753
+ ## Extends
2754
+
2755
+ - `BaseEmitterParams`
2756
+
2757
+ ## Properties
2758
+
2759
+ ### logger?
2760
+
2761
+ ```ts
2762
+ optional logger: Logger;
2763
+ ```
2764
+
2765
+ ### Inherited from
2766
+
2767
+ ```ts
2768
+ BaseEmitterParams.logger
2769
+ ```
2770
+
2771
+ ***
2772
+
2773
+ ### meterProvider?
2774
+
2775
+ ```ts
2776
+ optional meterProvider: MeterProvider;
2777
+ ```
2778
+
2779
+ ### Inherited from
2780
+
2781
+ ```ts
2782
+ BaseEmitterParams.meterProvider
2783
+ ```
2784
+
2785
+ ***
2786
+
2787
+ ### traceProvider?
2788
+
2789
+ ```ts
2790
+ optional traceProvider: TracerProvider;
2791
+ ```
2792
+
2793
+ ### Inherited from
2794
+
2795
+ ```ts
2796
+ BaseEmitterParams.traceProvider
2797
+ ```
2798
+
2799
+ ***
2800
+
2801
+ ### name?
2802
+
2803
+ ```ts
2804
+ optional name: string;
2805
+ ```
2806
+
2807
+ ***
2808
+
2809
+ ### statusReporter?
2810
+
2811
+ ```ts
2812
+ optional statusReporter: CreatableStatusReporter<void>;
2813
+ ```
2814
+
2815
+ ### <a id="CreatableStatusReporter"></a>CreatableStatusReporter
2816
+
2817
+ [**@xylabs/creatable**](#../README)
2818
+
2819
+ ***
2820
+
2821
+ ## Type Parameters
2822
+
2823
+ ### T
2824
+
2825
+ `T` *extends* `void` \| `string` = `void`
2826
+
2827
+ ## Methods
2828
+
2829
+ ### report()
2830
+
2831
+ ### Call Signature
2832
+
2833
+ ```ts
2834
+ report(
2835
+ name,
2836
+ status,
2837
+ progress?): void;
2838
+ ```
2839
+
2840
+ #### Parameters
2841
+
2842
+ ##### name
2843
+
2844
+ `string`
2845
+
2846
+ ##### status
2847
+
2848
+ `Exclude`\<`T` *extends* `void` ? [`CreatableStatus`](#../type-aliases/CreatableStatus) : `T` \| [`CreatableStatus`](#../type-aliases/CreatableStatus), `"error"`\>
2849
+
2850
+ ##### progress?
2851
+
2852
+ `number`
2853
+
2854
+ #### Returns
2855
+
2856
+ `void`
2857
+
2858
+ ### Call Signature
2859
+
2860
+ ```ts
2861
+ report(
2862
+ name,
2863
+ status,
2864
+ error?): void;
2865
+ ```
2866
+
2867
+ #### Parameters
2868
+
2869
+ ##### name
2870
+
2871
+ `string`
2872
+
2873
+ ##### status
2874
+
2875
+ `Extract`\<`T` *extends* `void` ? [`CreatableStatus`](#../type-aliases/CreatableStatus) : `T` \| [`CreatableStatus`](#../type-aliases/CreatableStatus), `"error"`\>
2876
+
2877
+ ##### error?
2878
+
2879
+ `Error`
2880
+
2881
+ #### Returns
2882
+
2883
+ `void`
2884
+
2885
+ ### <a id="CreatableWithFactory"></a>CreatableWithFactory
2886
+
2887
+ [**@xylabs/creatable**](#../README)
2888
+
2889
+ ***
2890
+
2891
+ ## Extends
2892
+
2893
+ - [`Creatable`](#Creatable)\<`T`\>
2894
+
2895
+ ## Type Parameters
2896
+
2897
+ ### T
2898
+
2899
+ `T` *extends* [`CreatableInstance`](#CreatableInstance) = [`CreatableInstance`](#CreatableInstance)
2900
+
2901
+ ## Constructors
2902
+
2903
+ ### Constructor
2904
+
2905
+ ```ts
2906
+ new CreatableWithFactory(key, params): T & AbstractCreatable<T["params"], EventData>;
2907
+ ```
2908
+
2909
+ ### Parameters
2910
+
2911
+ #### key
2912
+
2913
+ `unknown`
2914
+
2915
+ #### params
2916
+
2917
+ `Partial`\<[`CreatableParams`](#CreatableParams)\>
2918
+
2919
+ ### Returns
2920
+
2921
+ `T` & [`AbstractCreatable`](#../classes/AbstractCreatable)\<`T`\[`"params"`\], `EventData`\>
2922
+
2923
+ ### Inherited from
2924
+
2925
+ [`Creatable`](#Creatable).[`constructor`](Creatable.md#constructor)
2926
+
2927
+ ## Properties
2928
+
2929
+ ### defaultLogger?
2930
+
2931
+ ```ts
2932
+ optional defaultLogger: Logger;
2933
+ ```
2934
+
2935
+ ### Inherited from
2936
+
2937
+ [`Creatable`](#Creatable).[`defaultLogger`](Creatable.md#defaultlogger)
2938
+
2939
+ ## Methods
2940
+
2941
+ ### create()
2942
+
2943
+ ```ts
2944
+ create<T>(this, params?): Promise<T>;
2945
+ ```
2946
+
2947
+ ### Type Parameters
2948
+
2949
+ #### T
2950
+
2951
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
2952
+
2953
+ ### Parameters
2954
+
2955
+ #### this
2956
+
2957
+ [`Creatable`](#Creatable)\<`T`\>
2958
+
2959
+ #### params?
2960
+
2961
+ `Partial`\<`T`\[`"params"`\]\>
2962
+
2963
+ ### Returns
2964
+
2965
+ `Promise`\<`T`\>
2966
+
2967
+ ### Inherited from
2968
+
2969
+ [`Creatable`](#Creatable).[`create`](Creatable.md#create)
2970
+
2971
+ ***
2972
+
2973
+ ### createHandler()
2974
+
2975
+ ```ts
2976
+ createHandler<T>(this, instance): Promisable<T>;
2977
+ ```
2978
+
2979
+ ### Type Parameters
2980
+
2981
+ #### T
2982
+
2983
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
2984
+
2985
+ ### Parameters
2986
+
2987
+ #### this
2988
+
2989
+ [`Creatable`](#Creatable)\<`T`\>
2990
+
2991
+ #### instance
2992
+
2993
+ `T`
2994
+
2995
+ ### Returns
2996
+
2997
+ `Promisable`\<`T`\>
2998
+
2999
+ ### Inherited from
3000
+
3001
+ [`Creatable`](#Creatable).[`createHandler`](Creatable.md#createhandler)
3002
+
3003
+ ***
3004
+
3005
+ ### paramsHandler()
3006
+
3007
+ ```ts
3008
+ paramsHandler<T>(this, params?): Promisable<T["params"]>;
3009
+ ```
3010
+
3011
+ ### Type Parameters
3012
+
3013
+ #### T
3014
+
3015
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
3016
+
3017
+ ### Parameters
3018
+
3019
+ #### this
3020
+
3021
+ [`Creatable`](#Creatable)\<`T`\>
3022
+
3023
+ #### params?
3024
+
3025
+ `Partial`\<`T`\[`"params"`\]\>
3026
+
3027
+ ### Returns
3028
+
3029
+ `Promisable`\<`T`\[`"params"`\]\>
3030
+
3031
+ ### Inherited from
3032
+
3033
+ [`Creatable`](#Creatable).[`paramsHandler`](Creatable.md#paramshandler)
3034
+
3035
+ ***
3036
+
3037
+ ### factory()
3038
+
3039
+ ```ts
3040
+ factory<T>(
3041
+ this,
3042
+ params?,
3043
+ labels?): CreatableFactory<T>;
3044
+ ```
3045
+
3046
+ ### Type Parameters
3047
+
3048
+ #### T
3049
+
3050
+ `T` *extends* [`CreatableInstance`](#CreatableInstance)\<[`CreatableParams`](#CreatableParams), `EventData`\>
3051
+
3052
+ ### Parameters
3053
+
3054
+ #### this
3055
+
3056
+ [`Creatable`](#Creatable)\<`T`\>
3057
+
3058
+ #### params?
3059
+
3060
+ `Partial`\<`T`\[`"params"`\]\>
3061
+
3062
+ #### labels?
3063
+
3064
+ [`Labels`](#Labels)
3065
+
3066
+ ### Returns
3067
+
3068
+ [`CreatableFactory`](#CreatableFactory)\<`T`\>
3069
+
3070
+ ### <a id="Labels"></a>Labels
3071
+
3072
+ [**@xylabs/creatable**](#../README)
3073
+
3074
+ ***
3075
+
3076
+ Object used to represent labels identifying a resource.
3077
+
3078
+ ## Indexable
3079
+
3080
+ ```ts
3081
+ [key: string]: undefined | string
3082
+ ```
3083
+
3084
+ ### <a id="WithLabels"></a>WithLabels
3085
+
3086
+ [**@xylabs/creatable**](#../README)
3087
+
3088
+ ***
3089
+
3090
+ Interface for objects that have labels.
3091
+
3092
+ ## Type Parameters
3093
+
3094
+ ### T
3095
+
3096
+ `T` *extends* [`Labels`](#Labels) = [`Labels`](#Labels)
3097
+
3098
+ ## Properties
3099
+
3100
+ ### labels
3101
+
3102
+ ```ts
3103
+ labels: T;
3104
+ ```
3105
+
3106
+ ### <a id="WithOptionalLabels"></a>WithOptionalLabels
3107
+
3108
+ [**@xylabs/creatable**](#../README)
3109
+
3110
+ ***
3111
+
3112
+ Interface for objects that have labels.
3113
+
3114
+ ## Type Parameters
3115
+
3116
+ ### T
3117
+
3118
+ `T` *extends* [`Labels`](#Labels) = [`Labels`](#Labels)
3119
+
3120
+ ## Properties
3121
+
3122
+ ### labels?
3123
+
3124
+ ```ts
3125
+ optional labels: T;
3126
+ ```
3127
+
3128
+ ### type-aliases
3129
+
3130
+ ### <a id="CreatableName"></a>CreatableName
3131
+
3132
+ [**@xylabs/creatable**](#../README)
3133
+
3134
+ ***
3135
+
3136
+ ```ts
3137
+ type CreatableName = Exclude<string, "creatable-name-reserved-32546239486"> & BaseClassName;
3138
+ ```
3139
+
3140
+ ### <a id="CreatableStatus"></a>CreatableStatus
3141
+
3142
+ [**@xylabs/creatable**](#../README)
3143
+
3144
+ ***
3145
+
3146
+ ```ts
3147
+ type CreatableStatus =
3148
+ | "creating"
3149
+ | "created"
3150
+ | "starting"
3151
+ | "started"
3152
+ | "stopping"
3153
+ | "stopped"
3154
+ | "error";
3155
+ ```
20
3156
 
21
- Coming Soon!
22
3157
 
23
3158
  Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
24
3159