@teambit/worker 0.0.1393 → 0.0.1394

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.
@@ -0,0 +1,1930 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "filePath": "index.ts",
5
+ "line": 1,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "ModuleSchema",
10
+ "location": {
11
+ "filePath": "index.ts",
12
+ "line": 1,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "ExportSchema",
18
+ "location": {
19
+ "filePath": "index.ts",
20
+ "line": 6,
21
+ "character": 10
22
+ },
23
+ "signature": "const WorkerAspect: Aspect",
24
+ "name": "WorkerAspect",
25
+ "exportNode": {
26
+ "__schema": "VariableLikeSchema",
27
+ "location": {
28
+ "filePath": "worker.aspect.ts",
29
+ "line": 3,
30
+ "character": 14
31
+ },
32
+ "signature": "const WorkerAspect: Aspect",
33
+ "name": "WorkerAspect",
34
+ "type": {
35
+ "__schema": "TypeRefSchema",
36
+ "location": {
37
+ "filePath": "worker.aspect.ts",
38
+ "line": 3,
39
+ "character": 14
40
+ },
41
+ "name": "Aspect",
42
+ "componentId": {
43
+ "scope": "teambit.harmony",
44
+ "name": "harmony",
45
+ "version": "0.4.6"
46
+ }
47
+ },
48
+ "isOptional": false,
49
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/worker',\n})"
50
+ }
51
+ },
52
+ {
53
+ "__schema": "ExportSchema",
54
+ "location": {
55
+ "filePath": "index.ts",
56
+ "line": 7,
57
+ "character": 15
58
+ },
59
+ "signature": "class WorkerMain",
60
+ "name": "WorkerMain",
61
+ "exportNode": {
62
+ "__schema": "ClassSchema",
63
+ "location": {
64
+ "filePath": "worker.main.runtime.ts",
65
+ "line": 10,
66
+ "character": 1
67
+ },
68
+ "signature": "class WorkerMain",
69
+ "name": "WorkerMain",
70
+ "members": [
71
+ {
72
+ "__schema": "ConstructorSchema",
73
+ "location": {
74
+ "filePath": "worker.main.runtime.ts",
75
+ "line": 11,
76
+ "character": 3
77
+ },
78
+ "signature": "constructor WorkerMain(workerSlot: WorkerSlot, workerNameSlot: WorkerNameSlot): WorkerMain",
79
+ "name": "constructor",
80
+ "params": [
81
+ {
82
+ "__schema": "ParameterSchema",
83
+ "location": {
84
+ "filePath": "worker.main.runtime.ts",
85
+ "line": 12,
86
+ "character": 5
87
+ },
88
+ "name": "workerSlot",
89
+ "type": {
90
+ "__schema": "TypeRefSchema",
91
+ "location": {
92
+ "filePath": "worker.main.runtime.ts",
93
+ "line": 12,
94
+ "character": 25
95
+ },
96
+ "name": "WorkerSlot"
97
+ },
98
+ "isOptional": false,
99
+ "isSpread": false
100
+ },
101
+ {
102
+ "__schema": "ParameterSchema",
103
+ "location": {
104
+ "filePath": "worker.main.runtime.ts",
105
+ "line": 13,
106
+ "character": 5
107
+ },
108
+ "name": "workerNameSlot",
109
+ "type": {
110
+ "__schema": "TypeRefSchema",
111
+ "location": {
112
+ "filePath": "worker.main.runtime.ts",
113
+ "line": 13,
114
+ "character": 29
115
+ },
116
+ "name": "WorkerNameSlot"
117
+ },
118
+ "isOptional": false,
119
+ "isSpread": false
120
+ }
121
+ ],
122
+ "returnType": {
123
+ "__schema": "ThisTypeSchema",
124
+ "location": {
125
+ "filePath": "worker.main.runtime.ts",
126
+ "line": 10,
127
+ "character": 1
128
+ },
129
+ "name": "WorkerMain"
130
+ },
131
+ "modifiers": []
132
+ },
133
+ {
134
+ "__schema": "VariableLikeSchema",
135
+ "location": {
136
+ "filePath": "worker.main.runtime.ts",
137
+ "line": 16,
138
+ "character": 3
139
+ },
140
+ "signature": "(property) WorkerMain.runtime: RuntimeDefinition",
141
+ "name": "runtime",
142
+ "type": {
143
+ "__schema": "InferenceTypeSchema",
144
+ "location": {
145
+ "filePath": "worker.main.runtime.ts",
146
+ "line": 16,
147
+ "character": 3
148
+ },
149
+ "type": "RuntimeDefinition"
150
+ },
151
+ "isOptional": true,
152
+ "defaultValue": "MainRuntime"
153
+ },
154
+ {
155
+ "__schema": "FunctionLikeSchema",
156
+ "location": {
157
+ "filePath": "worker.main.runtime.ts",
158
+ "line": 18,
159
+ "character": 3
160
+ },
161
+ "signature": "(method) WorkerMain.listWorkers(): HarmonyWorker<any>[]",
162
+ "name": "listWorkers",
163
+ "params": [],
164
+ "returnType": {
165
+ "__schema": "TypeArraySchema",
166
+ "location": {
167
+ "filePath": "worker.main.runtime.ts",
168
+ "line": 18,
169
+ "character": 18
170
+ },
171
+ "type": {
172
+ "__schema": "TypeRefSchema",
173
+ "location": {
174
+ "filePath": "worker.main.runtime.ts",
175
+ "line": 18,
176
+ "character": 18
177
+ },
178
+ "name": "HarmonyWorker",
179
+ "typeArgs": [
180
+ {
181
+ "__schema": "KeywordTypeSchema",
182
+ "location": {
183
+ "filePath": "worker.main.runtime.ts",
184
+ "line": 18,
185
+ "character": 32
186
+ },
187
+ "name": "any"
188
+ }
189
+ ]
190
+ }
191
+ },
192
+ "modifiers": []
193
+ },
194
+ {
195
+ "__schema": "FunctionLikeSchema",
196
+ "location": {
197
+ "filePath": "worker.main.runtime.ts",
198
+ "line": 25,
199
+ "character": 3
200
+ },
201
+ "doc": {
202
+ "__schema": "DocSchema",
203
+ "location": {
204
+ "filePath": "worker.main.runtime.ts",
205
+ "line": 22,
206
+ "character": 3
207
+ },
208
+ "raw": "/**\n * create a new worker.\n */",
209
+ "comment": "create a new worker.",
210
+ "tags": []
211
+ },
212
+ "signature": "(method) WorkerMain.declareWorker<T>(name: string, path: string): HarmonyWorker<T>",
213
+ "name": "declareWorker",
214
+ "params": [
215
+ {
216
+ "__schema": "ParameterSchema",
217
+ "location": {
218
+ "filePath": "worker.main.runtime.ts",
219
+ "line": 25,
220
+ "character": 20
221
+ },
222
+ "name": "name",
223
+ "type": {
224
+ "__schema": "KeywordTypeSchema",
225
+ "location": {
226
+ "filePath": "worker.main.runtime.ts",
227
+ "line": 25,
228
+ "character": 26
229
+ },
230
+ "name": "string"
231
+ },
232
+ "isOptional": false,
233
+ "isSpread": false
234
+ },
235
+ {
236
+ "__schema": "ParameterSchema",
237
+ "location": {
238
+ "filePath": "worker.main.runtime.ts",
239
+ "line": 25,
240
+ "character": 34
241
+ },
242
+ "name": "path",
243
+ "type": {
244
+ "__schema": "KeywordTypeSchema",
245
+ "location": {
246
+ "filePath": "worker.main.runtime.ts",
247
+ "line": 25,
248
+ "character": 40
249
+ },
250
+ "name": "string"
251
+ },
252
+ "isOptional": false,
253
+ "isSpread": false
254
+ }
255
+ ],
256
+ "returnType": {
257
+ "__schema": "TypeRefSchema",
258
+ "location": {
259
+ "filePath": "worker.main.runtime.ts",
260
+ "line": 25,
261
+ "character": 49
262
+ },
263
+ "name": "HarmonyWorker",
264
+ "typeArgs": [
265
+ {
266
+ "__schema": "TypeRefSchema",
267
+ "location": {
268
+ "filePath": "worker.main.runtime.ts",
269
+ "line": 25,
270
+ "character": 63
271
+ },
272
+ "name": "T"
273
+ }
274
+ ]
275
+ },
276
+ "modifiers": [],
277
+ "typeParams": [
278
+ "T"
279
+ ]
280
+ },
281
+ {
282
+ "__schema": "FunctionLikeSchema",
283
+ "location": {
284
+ "filePath": "worker.main.runtime.ts",
285
+ "line": 52,
286
+ "character": 3
287
+ },
288
+ "signature": "(method) WorkerMain.getWorker<T>(id: string): HarmonyWorker<T>",
289
+ "name": "getWorker",
290
+ "params": [
291
+ {
292
+ "__schema": "ParameterSchema",
293
+ "location": {
294
+ "filePath": "worker.main.runtime.ts",
295
+ "line": 52,
296
+ "character": 16
297
+ },
298
+ "name": "id",
299
+ "type": {
300
+ "__schema": "KeywordTypeSchema",
301
+ "location": {
302
+ "filePath": "worker.main.runtime.ts",
303
+ "line": 52,
304
+ "character": 20
305
+ },
306
+ "name": "string"
307
+ },
308
+ "isOptional": false,
309
+ "isSpread": false
310
+ }
311
+ ],
312
+ "returnType": {
313
+ "__schema": "TypeRefSchema",
314
+ "location": {
315
+ "filePath": "worker.main.runtime.ts",
316
+ "line": 52,
317
+ "character": 29
318
+ },
319
+ "name": "HarmonyWorker",
320
+ "typeArgs": [
321
+ {
322
+ "__schema": "TypeRefSchema",
323
+ "location": {
324
+ "filePath": "worker.main.runtime.ts",
325
+ "line": 52,
326
+ "character": 43
327
+ },
328
+ "name": "T"
329
+ }
330
+ ]
331
+ },
332
+ "modifiers": [],
333
+ "typeParams": [
334
+ "T"
335
+ ]
336
+ },
337
+ {
338
+ "__schema": "VariableLikeSchema",
339
+ "location": {
340
+ "filePath": "worker.main.runtime.ts",
341
+ "line": 56,
342
+ "character": 3
343
+ },
344
+ "signature": "(property) WorkerMain.slots: (((registerFn: () => string) => SlotRegistry<string>) | ((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>))[]",
345
+ "name": "slots",
346
+ "type": {
347
+ "__schema": "InferenceTypeSchema",
348
+ "location": {
349
+ "filePath": "worker.main.runtime.ts",
350
+ "line": 56,
351
+ "character": 3
352
+ },
353
+ "type": "(((registerFn: () => string) => SlotRegistry<string>) | ((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>))[]"
354
+ },
355
+ "isOptional": true,
356
+ "defaultValue": "[Slot.withType<HarmonyWorker<unknown>>(), Slot.withType<string>()]"
357
+ },
358
+ {
359
+ "__schema": "VariableLikeSchema",
360
+ "location": {
361
+ "filePath": "worker.main.runtime.ts",
362
+ "line": 58,
363
+ "character": 3
364
+ },
365
+ "signature": "(property) WorkerMain.dependencies: never[]",
366
+ "name": "dependencies",
367
+ "type": {
368
+ "__schema": "InferenceTypeSchema",
369
+ "location": {
370
+ "filePath": "worker.main.runtime.ts",
371
+ "line": 58,
372
+ "character": 3
373
+ },
374
+ "type": "never[]"
375
+ },
376
+ "isOptional": true,
377
+ "defaultValue": "[]"
378
+ },
379
+ {
380
+ "__schema": "FunctionLikeSchema",
381
+ "location": {
382
+ "filePath": "worker.main.runtime.ts",
383
+ "line": 60,
384
+ "character": 3
385
+ },
386
+ "signature": "(method) WorkerMain.provider(_deps: any, _config: any, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]): Promise<WorkerMain>",
387
+ "name": "provider",
388
+ "params": [
389
+ {
390
+ "__schema": "ParameterSchema",
391
+ "location": {
392
+ "filePath": "worker.main.runtime.ts",
393
+ "line": 60,
394
+ "character": 25
395
+ },
396
+ "name": "_deps",
397
+ "type": {
398
+ "__schema": "InferenceTypeSchema",
399
+ "location": {
400
+ "filePath": "worker.main.runtime.ts",
401
+ "line": 60,
402
+ "character": 25
403
+ },
404
+ "type": "any"
405
+ },
406
+ "isOptional": false,
407
+ "isSpread": false
408
+ },
409
+ {
410
+ "__schema": "ParameterSchema",
411
+ "location": {
412
+ "filePath": "worker.main.runtime.ts",
413
+ "line": 60,
414
+ "character": 32
415
+ },
416
+ "name": "_config",
417
+ "type": {
418
+ "__schema": "InferenceTypeSchema",
419
+ "location": {
420
+ "filePath": "worker.main.runtime.ts",
421
+ "line": 60,
422
+ "character": 32
423
+ },
424
+ "type": "any"
425
+ },
426
+ "isOptional": false,
427
+ "isSpread": false
428
+ },
429
+ {
430
+ "__schema": "ParameterSchema",
431
+ "location": {
432
+ "filePath": "worker.main.runtime.ts",
433
+ "line": 60,
434
+ "character": 41
435
+ },
436
+ "name": "[ workerSlot, workerNameSlot ]",
437
+ "type": {
438
+ "__schema": "TupleTypeSchema",
439
+ "location": {
440
+ "filePath": "worker.main.runtime.ts",
441
+ "line": 60,
442
+ "character": 71
443
+ },
444
+ "elements": [
445
+ {
446
+ "__schema": "TypeRefSchema",
447
+ "location": {
448
+ "filePath": "worker.main.runtime.ts",
449
+ "line": 60,
450
+ "character": 72
451
+ },
452
+ "name": "WorkerSlot"
453
+ },
454
+ {
455
+ "__schema": "TypeRefSchema",
456
+ "location": {
457
+ "filePath": "worker.main.runtime.ts",
458
+ "line": 60,
459
+ "character": 84
460
+ },
461
+ "name": "WorkerNameSlot"
462
+ }
463
+ ]
464
+ },
465
+ "isOptional": false,
466
+ "isSpread": false
467
+ }
468
+ ],
469
+ "returnType": {
470
+ "__schema": "InferenceTypeSchema",
471
+ "location": {
472
+ "filePath": "worker.main.runtime.ts",
473
+ "line": 60,
474
+ "character": 3
475
+ },
476
+ "type": "Promise<WorkerMain>"
477
+ },
478
+ "modifiers": [
479
+ "static",
480
+ "async"
481
+ ]
482
+ }
483
+ ],
484
+ "extendsNodes": [],
485
+ "implementNodes": []
486
+ }
487
+ },
488
+ {
489
+ "__schema": "ExportSchema",
490
+ "location": {
491
+ "filePath": "index.ts",
492
+ "line": 8,
493
+ "character": 15
494
+ },
495
+ "signature": "class HarmonyWorker<T>",
496
+ "name": "HarmonyWorker",
497
+ "exportNode": {
498
+ "__schema": "ClassSchema",
499
+ "location": {
500
+ "filePath": "harmony-worker.ts",
501
+ "line": 27,
502
+ "character": 1
503
+ },
504
+ "signature": "class HarmonyWorker<T>",
505
+ "name": "HarmonyWorker",
506
+ "members": [
507
+ {
508
+ "__schema": "ConstructorSchema",
509
+ "location": {
510
+ "filePath": "harmony-worker.ts",
511
+ "line": 28,
512
+ "character": 3
513
+ },
514
+ "signature": "constructor HarmonyWorker<T>(name: string, workerPath: string): HarmonyWorker<T>",
515
+ "name": "constructor",
516
+ "params": [
517
+ {
518
+ "__schema": "ParameterSchema",
519
+ "location": {
520
+ "filePath": "harmony-worker.ts",
521
+ "line": 29,
522
+ "character": 5
523
+ },
524
+ "name": "name",
525
+ "type": {
526
+ "__schema": "KeywordTypeSchema",
527
+ "location": {
528
+ "filePath": "harmony-worker.ts",
529
+ "line": 29,
530
+ "character": 20
531
+ },
532
+ "name": "string"
533
+ },
534
+ "isOptional": false,
535
+ "isSpread": false
536
+ },
537
+ {
538
+ "__schema": "ParameterSchema",
539
+ "location": {
540
+ "filePath": "harmony-worker.ts",
541
+ "line": 30,
542
+ "character": 5
543
+ },
544
+ "name": "workerPath",
545
+ "type": {
546
+ "__schema": "KeywordTypeSchema",
547
+ "location": {
548
+ "filePath": "harmony-worker.ts",
549
+ "line": 30,
550
+ "character": 26
551
+ },
552
+ "name": "string"
553
+ },
554
+ "isOptional": false,
555
+ "isSpread": false
556
+ }
557
+ ],
558
+ "returnType": {
559
+ "__schema": "ThisTypeSchema",
560
+ "location": {
561
+ "filePath": "harmony-worker.ts",
562
+ "line": 27,
563
+ "character": 1
564
+ },
565
+ "name": "HarmonyWorker"
566
+ },
567
+ "modifiers": []
568
+ },
569
+ {
570
+ "__schema": "VariableLikeSchema",
571
+ "location": {
572
+ "filePath": "harmony-worker.ts",
573
+ "line": 33,
574
+ "character": 3
575
+ },
576
+ "signature": "(property) HarmonyWorker<T>.remoteWorker: Remote<T> | undefined",
577
+ "name": "remoteWorker",
578
+ "type": {
579
+ "__schema": "TypeUnionSchema",
580
+ "location": {
581
+ "filePath": "harmony-worker.ts",
582
+ "line": 33,
583
+ "character": 27
584
+ },
585
+ "types": [
586
+ {
587
+ "__schema": "KeywordTypeSchema",
588
+ "location": {
589
+ "filePath": "harmony-worker.ts",
590
+ "line": 33,
591
+ "character": 27
592
+ },
593
+ "name": "undefined"
594
+ },
595
+ {
596
+ "__schema": "TypeRefSchema",
597
+ "location": {
598
+ "filePath": "harmony-worker.ts",
599
+ "line": 33,
600
+ "character": 39
601
+ },
602
+ "name": "Remote",
603
+ "typeArgs": [
604
+ {
605
+ "__schema": "TypeRefSchema",
606
+ "location": {
607
+ "filePath": "harmony-worker.ts",
608
+ "line": 33,
609
+ "character": 46
610
+ },
611
+ "name": "T"
612
+ }
613
+ ]
614
+ }
615
+ ]
616
+ },
617
+ "isOptional": false
618
+ },
619
+ {
620
+ "__schema": "VariableLikeSchema",
621
+ "location": {
622
+ "filePath": "harmony-worker.ts",
623
+ "line": 35,
624
+ "character": 3
625
+ },
626
+ "signature": "(property) HarmonyWorker<T>.worker: Worker | undefined",
627
+ "name": "worker",
628
+ "type": {
629
+ "__schema": "TypeUnionSchema",
630
+ "location": {
631
+ "filePath": "harmony-worker.ts",
632
+ "line": 35,
633
+ "character": 21
634
+ },
635
+ "types": [
636
+ {
637
+ "__schema": "TypeRefSchema",
638
+ "location": {
639
+ "filePath": "harmony-worker.ts",
640
+ "line": 35,
641
+ "character": 21
642
+ },
643
+ "name": "Worker"
644
+ },
645
+ {
646
+ "__schema": "KeywordTypeSchema",
647
+ "location": {
648
+ "filePath": "harmony-worker.ts",
649
+ "line": 35,
650
+ "character": 30
651
+ },
652
+ "name": "undefined"
653
+ }
654
+ ]
655
+ },
656
+ "isOptional": false
657
+ },
658
+ {
659
+ "__schema": "GetAccessorSchema",
660
+ "location": {
661
+ "filePath": "harmony-worker.ts",
662
+ "line": 37,
663
+ "character": 3
664
+ },
665
+ "signature": "(getter) HarmonyWorker<T>.stdout: internal.Readable | undefined",
666
+ "name": "stdout",
667
+ "type": {
668
+ "__schema": "InferenceTypeSchema",
669
+ "location": {
670
+ "filePath": "harmony-worker.ts",
671
+ "line": 37,
672
+ "character": 3
673
+ },
674
+ "type": "internal.Readable | undefined"
675
+ }
676
+ },
677
+ {
678
+ "__schema": "GetAccessorSchema",
679
+ "location": {
680
+ "filePath": "harmony-worker.ts",
681
+ "line": 41,
682
+ "character": 3
683
+ },
684
+ "signature": "(getter) HarmonyWorker<T>.stderr: internal.Readable | undefined",
685
+ "name": "stderr",
686
+ "type": {
687
+ "__schema": "InferenceTypeSchema",
688
+ "location": {
689
+ "filePath": "harmony-worker.ts",
690
+ "line": 41,
691
+ "character": 3
692
+ },
693
+ "type": "internal.Readable | undefined"
694
+ }
695
+ },
696
+ {
697
+ "__schema": "GetAccessorSchema",
698
+ "location": {
699
+ "filePath": "harmony-worker.ts",
700
+ "line": 45,
701
+ "character": 3
702
+ },
703
+ "signature": "(getter) HarmonyWorker<T>.stdin: internal.Writable | null | undefined",
704
+ "name": "stdin",
705
+ "type": {
706
+ "__schema": "InferenceTypeSchema",
707
+ "location": {
708
+ "filePath": "harmony-worker.ts",
709
+ "line": 45,
710
+ "character": 3
711
+ },
712
+ "type": "internal.Writable | null | undefined"
713
+ }
714
+ },
715
+ {
716
+ "__schema": "FunctionLikeSchema",
717
+ "location": {
718
+ "filePath": "harmony-worker.ts",
719
+ "line": 59,
720
+ "character": 3
721
+ },
722
+ "signature": "(method) HarmonyWorker<T>.initiate(options: Partial<InitOptions>): Remote<T>",
723
+ "name": "initiate",
724
+ "params": [
725
+ {
726
+ "__schema": "ParameterSchema",
727
+ "location": {
728
+ "filePath": "harmony-worker.ts",
729
+ "line": 59,
730
+ "character": 12
731
+ },
732
+ "name": "options",
733
+ "type": {
734
+ "__schema": "TypeRefSchema",
735
+ "location": {
736
+ "filePath": "harmony-worker.ts",
737
+ "line": 59,
738
+ "character": 21
739
+ },
740
+ "name": "Partial",
741
+ "typeArgs": [
742
+ {
743
+ "__schema": "TypeRefSchema",
744
+ "location": {
745
+ "filePath": "harmony-worker.ts",
746
+ "line": 59,
747
+ "character": 29
748
+ },
749
+ "name": "InitOptions"
750
+ }
751
+ ]
752
+ },
753
+ "isOptional": false,
754
+ "isSpread": false
755
+ }
756
+ ],
757
+ "returnType": {
758
+ "__schema": "TypeRefSchema",
759
+ "location": {
760
+ "filePath": "harmony-worker.ts",
761
+ "line": 59,
762
+ "character": 44
763
+ },
764
+ "name": "Remote",
765
+ "typeArgs": [
766
+ {
767
+ "__schema": "TypeRefSchema",
768
+ "location": {
769
+ "filePath": "harmony-worker.ts",
770
+ "line": 59,
771
+ "character": 51
772
+ },
773
+ "name": "T"
774
+ }
775
+ ]
776
+ },
777
+ "modifiers": []
778
+ },
779
+ {
780
+ "__schema": "FunctionLikeSchema",
781
+ "location": {
782
+ "filePath": "harmony-worker.ts",
783
+ "line": 67,
784
+ "character": 3
785
+ },
786
+ "signature": "(method) HarmonyWorker<T>.get(): Remote<T> | undefined",
787
+ "name": "get",
788
+ "params": [],
789
+ "returnType": {
790
+ "__schema": "InferenceTypeSchema",
791
+ "location": {
792
+ "filePath": "harmony-worker.ts",
793
+ "line": 67,
794
+ "character": 3
795
+ },
796
+ "type": "Remote<T> | undefined"
797
+ },
798
+ "modifiers": []
799
+ },
800
+ {
801
+ "__schema": "FunctionLikeSchema",
802
+ "location": {
803
+ "filePath": "harmony-worker.ts",
804
+ "line": 71,
805
+ "character": 3
806
+ },
807
+ "signature": "(method) HarmonyWorker<T>.terminate(): Promise<void>",
808
+ "name": "terminate",
809
+ "params": [],
810
+ "returnType": {
811
+ "__schema": "InferenceTypeSchema",
812
+ "location": {
813
+ "filePath": "harmony-worker.ts",
814
+ "line": 71,
815
+ "character": 3
816
+ },
817
+ "type": "Promise<void>"
818
+ },
819
+ "modifiers": [
820
+ "async"
821
+ ]
822
+ }
823
+ ],
824
+ "typeParams": [
825
+ "T"
826
+ ],
827
+ "extendsNodes": [],
828
+ "implementNodes": []
829
+ }
830
+ },
831
+ {
832
+ "__schema": "ExportSchema",
833
+ "location": {
834
+ "filePath": "index.ts",
835
+ "line": 9,
836
+ "character": 10
837
+ },
838
+ "signature": "function expose(object: any): void",
839
+ "name": "expose",
840
+ "exportNode": {
841
+ "__schema": "FunctionLikeSchema",
842
+ "location": {
843
+ "filePath": "expose.ts",
844
+ "line": 25,
845
+ "character": 1
846
+ },
847
+ "signature": "function expose(object: any): void",
848
+ "name": "expose",
849
+ "params": [
850
+ {
851
+ "__schema": "ParameterSchema",
852
+ "location": {
853
+ "filePath": "expose.ts",
854
+ "line": 25,
855
+ "character": 24
856
+ },
857
+ "name": "object",
858
+ "type": {
859
+ "__schema": "KeywordTypeSchema",
860
+ "location": {
861
+ "filePath": "expose.ts",
862
+ "line": 25,
863
+ "character": 32
864
+ },
865
+ "name": "any"
866
+ },
867
+ "isOptional": false,
868
+ "isSpread": false
869
+ }
870
+ ],
871
+ "returnType": {
872
+ "__schema": "InferenceTypeSchema",
873
+ "location": {
874
+ "filePath": "expose.ts",
875
+ "line": 25,
876
+ "character": 1
877
+ },
878
+ "type": "void"
879
+ },
880
+ "modifiers": [
881
+ "export"
882
+ ]
883
+ }
884
+ },
885
+ {
886
+ "__schema": "UnImplementedSchema",
887
+ "location": {
888
+ "filePath": "index.ts",
889
+ "line": 10,
890
+ "character": 16
891
+ },
892
+ "name": "WorkerAspect",
893
+ "type": "Identifier"
894
+ }
895
+ ],
896
+ "internals": [
897
+ {
898
+ "__schema": "UnImplementedSchema",
899
+ "location": {
900
+ "filePath": "index.ts",
901
+ "line": 4,
902
+ "character": 1
903
+ },
904
+ "name": "setFunctionHandlers();",
905
+ "type": "ExpressionStatement"
906
+ }
907
+ ]
908
+ },
909
+ "internals": [
910
+ {
911
+ "__schema": "ModuleSchema",
912
+ "location": {
913
+ "filePath": "worker.aspect.ts",
914
+ "line": 1,
915
+ "character": 1
916
+ },
917
+ "exports": [
918
+ {
919
+ "__schema": "VariableLikeSchema",
920
+ "location": {
921
+ "filePath": "worker.aspect.ts",
922
+ "line": 3,
923
+ "character": 14
924
+ },
925
+ "signature": "const WorkerAspect: Aspect",
926
+ "name": "WorkerAspect",
927
+ "type": {
928
+ "__schema": "TypeRefSchema",
929
+ "location": {
930
+ "filePath": "worker.aspect.ts",
931
+ "line": 3,
932
+ "character": 14
933
+ },
934
+ "name": "Aspect",
935
+ "componentId": {
936
+ "scope": "teambit.harmony",
937
+ "name": "harmony",
938
+ "version": "0.4.6"
939
+ }
940
+ },
941
+ "isOptional": false,
942
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/worker',\n})"
943
+ }
944
+ ],
945
+ "internals": []
946
+ },
947
+ {
948
+ "__schema": "ModuleSchema",
949
+ "location": {
950
+ "filePath": "worker.main.runtime.ts",
951
+ "line": 1,
952
+ "character": 1
953
+ },
954
+ "exports": [
955
+ {
956
+ "__schema": "TypeSchema",
957
+ "location": {
958
+ "filePath": "worker.main.runtime.ts",
959
+ "line": 6,
960
+ "character": 1
961
+ },
962
+ "signature": "type WorkerSlot = SlotRegistry<HarmonyWorker<unknown>>",
963
+ "name": "WorkerSlot",
964
+ "type": {
965
+ "__schema": "TypeRefSchema",
966
+ "location": {
967
+ "filePath": "worker.main.runtime.ts",
968
+ "line": 6,
969
+ "character": 26
970
+ },
971
+ "name": "SlotRegistry",
972
+ "typeArgs": [
973
+ {
974
+ "__schema": "TypeRefSchema",
975
+ "location": {
976
+ "filePath": "worker.main.runtime.ts",
977
+ "line": 6,
978
+ "character": 39
979
+ },
980
+ "name": "HarmonyWorker",
981
+ "typeArgs": [
982
+ {
983
+ "__schema": "KeywordTypeSchema",
984
+ "location": {
985
+ "filePath": "worker.main.runtime.ts",
986
+ "line": 6,
987
+ "character": 53
988
+ },
989
+ "name": "unknown"
990
+ }
991
+ ]
992
+ }
993
+ ]
994
+ }
995
+ },
996
+ {
997
+ "__schema": "TypeSchema",
998
+ "location": {
999
+ "filePath": "worker.main.runtime.ts",
1000
+ "line": 8,
1001
+ "character": 1
1002
+ },
1003
+ "signature": "type WorkerNameSlot = SlotRegistry<string>",
1004
+ "name": "WorkerNameSlot",
1005
+ "type": {
1006
+ "__schema": "TypeRefSchema",
1007
+ "location": {
1008
+ "filePath": "worker.main.runtime.ts",
1009
+ "line": 8,
1010
+ "character": 30
1011
+ },
1012
+ "name": "SlotRegistry",
1013
+ "typeArgs": [
1014
+ {
1015
+ "__schema": "KeywordTypeSchema",
1016
+ "location": {
1017
+ "filePath": "worker.main.runtime.ts",
1018
+ "line": 8,
1019
+ "character": 43
1020
+ },
1021
+ "name": "string"
1022
+ }
1023
+ ]
1024
+ }
1025
+ },
1026
+ {
1027
+ "__schema": "ClassSchema",
1028
+ "location": {
1029
+ "filePath": "worker.main.runtime.ts",
1030
+ "line": 10,
1031
+ "character": 1
1032
+ },
1033
+ "signature": "class WorkerMain",
1034
+ "name": "WorkerMain",
1035
+ "members": [
1036
+ {
1037
+ "__schema": "ConstructorSchema",
1038
+ "location": {
1039
+ "filePath": "worker.main.runtime.ts",
1040
+ "line": 11,
1041
+ "character": 3
1042
+ },
1043
+ "signature": "constructor WorkerMain(workerSlot: WorkerSlot, workerNameSlot: WorkerNameSlot): WorkerMain",
1044
+ "name": "constructor",
1045
+ "params": [
1046
+ {
1047
+ "__schema": "ParameterSchema",
1048
+ "location": {
1049
+ "filePath": "worker.main.runtime.ts",
1050
+ "line": 12,
1051
+ "character": 5
1052
+ },
1053
+ "name": "workerSlot",
1054
+ "type": {
1055
+ "__schema": "TypeRefSchema",
1056
+ "location": {
1057
+ "filePath": "worker.main.runtime.ts",
1058
+ "line": 12,
1059
+ "character": 25
1060
+ },
1061
+ "name": "WorkerSlot"
1062
+ },
1063
+ "isOptional": false,
1064
+ "isSpread": false
1065
+ },
1066
+ {
1067
+ "__schema": "ParameterSchema",
1068
+ "location": {
1069
+ "filePath": "worker.main.runtime.ts",
1070
+ "line": 13,
1071
+ "character": 5
1072
+ },
1073
+ "name": "workerNameSlot",
1074
+ "type": {
1075
+ "__schema": "TypeRefSchema",
1076
+ "location": {
1077
+ "filePath": "worker.main.runtime.ts",
1078
+ "line": 13,
1079
+ "character": 29
1080
+ },
1081
+ "name": "WorkerNameSlot"
1082
+ },
1083
+ "isOptional": false,
1084
+ "isSpread": false
1085
+ }
1086
+ ],
1087
+ "returnType": {
1088
+ "__schema": "ThisTypeSchema",
1089
+ "location": {
1090
+ "filePath": "worker.main.runtime.ts",
1091
+ "line": 10,
1092
+ "character": 1
1093
+ },
1094
+ "name": "WorkerMain"
1095
+ },
1096
+ "modifiers": []
1097
+ },
1098
+ {
1099
+ "__schema": "VariableLikeSchema",
1100
+ "location": {
1101
+ "filePath": "worker.main.runtime.ts",
1102
+ "line": 16,
1103
+ "character": 3
1104
+ },
1105
+ "signature": "(property) WorkerMain.runtime: RuntimeDefinition",
1106
+ "name": "runtime",
1107
+ "type": {
1108
+ "__schema": "InferenceTypeSchema",
1109
+ "location": {
1110
+ "filePath": "worker.main.runtime.ts",
1111
+ "line": 16,
1112
+ "character": 3
1113
+ },
1114
+ "type": "RuntimeDefinition"
1115
+ },
1116
+ "isOptional": true,
1117
+ "defaultValue": "MainRuntime"
1118
+ },
1119
+ {
1120
+ "__schema": "FunctionLikeSchema",
1121
+ "location": {
1122
+ "filePath": "worker.main.runtime.ts",
1123
+ "line": 18,
1124
+ "character": 3
1125
+ },
1126
+ "signature": "(method) WorkerMain.listWorkers(): HarmonyWorker<any>[]",
1127
+ "name": "listWorkers",
1128
+ "params": [],
1129
+ "returnType": {
1130
+ "__schema": "TypeArraySchema",
1131
+ "location": {
1132
+ "filePath": "worker.main.runtime.ts",
1133
+ "line": 18,
1134
+ "character": 18
1135
+ },
1136
+ "type": {
1137
+ "__schema": "TypeRefSchema",
1138
+ "location": {
1139
+ "filePath": "worker.main.runtime.ts",
1140
+ "line": 18,
1141
+ "character": 18
1142
+ },
1143
+ "name": "HarmonyWorker",
1144
+ "typeArgs": [
1145
+ {
1146
+ "__schema": "KeywordTypeSchema",
1147
+ "location": {
1148
+ "filePath": "worker.main.runtime.ts",
1149
+ "line": 18,
1150
+ "character": 32
1151
+ },
1152
+ "name": "any"
1153
+ }
1154
+ ]
1155
+ }
1156
+ },
1157
+ "modifiers": []
1158
+ },
1159
+ {
1160
+ "__schema": "FunctionLikeSchema",
1161
+ "location": {
1162
+ "filePath": "worker.main.runtime.ts",
1163
+ "line": 25,
1164
+ "character": 3
1165
+ },
1166
+ "doc": {
1167
+ "__schema": "DocSchema",
1168
+ "location": {
1169
+ "filePath": "worker.main.runtime.ts",
1170
+ "line": 22,
1171
+ "character": 3
1172
+ },
1173
+ "raw": "/**\n * create a new worker.\n */",
1174
+ "comment": "create a new worker.",
1175
+ "tags": []
1176
+ },
1177
+ "signature": "(method) WorkerMain.declareWorker<T>(name: string, path: string): HarmonyWorker<T>",
1178
+ "name": "declareWorker",
1179
+ "params": [
1180
+ {
1181
+ "__schema": "ParameterSchema",
1182
+ "location": {
1183
+ "filePath": "worker.main.runtime.ts",
1184
+ "line": 25,
1185
+ "character": 20
1186
+ },
1187
+ "name": "name",
1188
+ "type": {
1189
+ "__schema": "KeywordTypeSchema",
1190
+ "location": {
1191
+ "filePath": "worker.main.runtime.ts",
1192
+ "line": 25,
1193
+ "character": 26
1194
+ },
1195
+ "name": "string"
1196
+ },
1197
+ "isOptional": false,
1198
+ "isSpread": false
1199
+ },
1200
+ {
1201
+ "__schema": "ParameterSchema",
1202
+ "location": {
1203
+ "filePath": "worker.main.runtime.ts",
1204
+ "line": 25,
1205
+ "character": 34
1206
+ },
1207
+ "name": "path",
1208
+ "type": {
1209
+ "__schema": "KeywordTypeSchema",
1210
+ "location": {
1211
+ "filePath": "worker.main.runtime.ts",
1212
+ "line": 25,
1213
+ "character": 40
1214
+ },
1215
+ "name": "string"
1216
+ },
1217
+ "isOptional": false,
1218
+ "isSpread": false
1219
+ }
1220
+ ],
1221
+ "returnType": {
1222
+ "__schema": "TypeRefSchema",
1223
+ "location": {
1224
+ "filePath": "worker.main.runtime.ts",
1225
+ "line": 25,
1226
+ "character": 49
1227
+ },
1228
+ "name": "HarmonyWorker",
1229
+ "typeArgs": [
1230
+ {
1231
+ "__schema": "TypeRefSchema",
1232
+ "location": {
1233
+ "filePath": "worker.main.runtime.ts",
1234
+ "line": 25,
1235
+ "character": 63
1236
+ },
1237
+ "name": "T"
1238
+ }
1239
+ ]
1240
+ },
1241
+ "modifiers": [],
1242
+ "typeParams": [
1243
+ "T"
1244
+ ]
1245
+ },
1246
+ {
1247
+ "__schema": "FunctionLikeSchema",
1248
+ "location": {
1249
+ "filePath": "worker.main.runtime.ts",
1250
+ "line": 52,
1251
+ "character": 3
1252
+ },
1253
+ "signature": "(method) WorkerMain.getWorker<T>(id: string): HarmonyWorker<T>",
1254
+ "name": "getWorker",
1255
+ "params": [
1256
+ {
1257
+ "__schema": "ParameterSchema",
1258
+ "location": {
1259
+ "filePath": "worker.main.runtime.ts",
1260
+ "line": 52,
1261
+ "character": 16
1262
+ },
1263
+ "name": "id",
1264
+ "type": {
1265
+ "__schema": "KeywordTypeSchema",
1266
+ "location": {
1267
+ "filePath": "worker.main.runtime.ts",
1268
+ "line": 52,
1269
+ "character": 20
1270
+ },
1271
+ "name": "string"
1272
+ },
1273
+ "isOptional": false,
1274
+ "isSpread": false
1275
+ }
1276
+ ],
1277
+ "returnType": {
1278
+ "__schema": "TypeRefSchema",
1279
+ "location": {
1280
+ "filePath": "worker.main.runtime.ts",
1281
+ "line": 52,
1282
+ "character": 29
1283
+ },
1284
+ "name": "HarmonyWorker",
1285
+ "typeArgs": [
1286
+ {
1287
+ "__schema": "TypeRefSchema",
1288
+ "location": {
1289
+ "filePath": "worker.main.runtime.ts",
1290
+ "line": 52,
1291
+ "character": 43
1292
+ },
1293
+ "name": "T"
1294
+ }
1295
+ ]
1296
+ },
1297
+ "modifiers": [],
1298
+ "typeParams": [
1299
+ "T"
1300
+ ]
1301
+ },
1302
+ {
1303
+ "__schema": "VariableLikeSchema",
1304
+ "location": {
1305
+ "filePath": "worker.main.runtime.ts",
1306
+ "line": 56,
1307
+ "character": 3
1308
+ },
1309
+ "signature": "(property) WorkerMain.slots: (((registerFn: () => string) => SlotRegistry<string>) | ((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>))[]",
1310
+ "name": "slots",
1311
+ "type": {
1312
+ "__schema": "InferenceTypeSchema",
1313
+ "location": {
1314
+ "filePath": "worker.main.runtime.ts",
1315
+ "line": 56,
1316
+ "character": 3
1317
+ },
1318
+ "type": "(((registerFn: () => string) => SlotRegistry<string>) | ((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>))[]"
1319
+ },
1320
+ "isOptional": true,
1321
+ "defaultValue": "[Slot.withType<HarmonyWorker<unknown>>(), Slot.withType<string>()]"
1322
+ },
1323
+ {
1324
+ "__schema": "VariableLikeSchema",
1325
+ "location": {
1326
+ "filePath": "worker.main.runtime.ts",
1327
+ "line": 58,
1328
+ "character": 3
1329
+ },
1330
+ "signature": "(property) WorkerMain.dependencies: never[]",
1331
+ "name": "dependencies",
1332
+ "type": {
1333
+ "__schema": "InferenceTypeSchema",
1334
+ "location": {
1335
+ "filePath": "worker.main.runtime.ts",
1336
+ "line": 58,
1337
+ "character": 3
1338
+ },
1339
+ "type": "never[]"
1340
+ },
1341
+ "isOptional": true,
1342
+ "defaultValue": "[]"
1343
+ },
1344
+ {
1345
+ "__schema": "FunctionLikeSchema",
1346
+ "location": {
1347
+ "filePath": "worker.main.runtime.ts",
1348
+ "line": 60,
1349
+ "character": 3
1350
+ },
1351
+ "signature": "(method) WorkerMain.provider(_deps: any, _config: any, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]): Promise<WorkerMain>",
1352
+ "name": "provider",
1353
+ "params": [
1354
+ {
1355
+ "__schema": "ParameterSchema",
1356
+ "location": {
1357
+ "filePath": "worker.main.runtime.ts",
1358
+ "line": 60,
1359
+ "character": 25
1360
+ },
1361
+ "name": "_deps",
1362
+ "type": {
1363
+ "__schema": "InferenceTypeSchema",
1364
+ "location": {
1365
+ "filePath": "worker.main.runtime.ts",
1366
+ "line": 60,
1367
+ "character": 25
1368
+ },
1369
+ "type": "any"
1370
+ },
1371
+ "isOptional": false,
1372
+ "isSpread": false
1373
+ },
1374
+ {
1375
+ "__schema": "ParameterSchema",
1376
+ "location": {
1377
+ "filePath": "worker.main.runtime.ts",
1378
+ "line": 60,
1379
+ "character": 32
1380
+ },
1381
+ "name": "_config",
1382
+ "type": {
1383
+ "__schema": "InferenceTypeSchema",
1384
+ "location": {
1385
+ "filePath": "worker.main.runtime.ts",
1386
+ "line": 60,
1387
+ "character": 32
1388
+ },
1389
+ "type": "any"
1390
+ },
1391
+ "isOptional": false,
1392
+ "isSpread": false
1393
+ },
1394
+ {
1395
+ "__schema": "ParameterSchema",
1396
+ "location": {
1397
+ "filePath": "worker.main.runtime.ts",
1398
+ "line": 60,
1399
+ "character": 41
1400
+ },
1401
+ "name": "[ workerSlot, workerNameSlot ]",
1402
+ "type": {
1403
+ "__schema": "TupleTypeSchema",
1404
+ "location": {
1405
+ "filePath": "worker.main.runtime.ts",
1406
+ "line": 60,
1407
+ "character": 71
1408
+ },
1409
+ "elements": [
1410
+ {
1411
+ "__schema": "TypeRefSchema",
1412
+ "location": {
1413
+ "filePath": "worker.main.runtime.ts",
1414
+ "line": 60,
1415
+ "character": 72
1416
+ },
1417
+ "name": "WorkerSlot"
1418
+ },
1419
+ {
1420
+ "__schema": "TypeRefSchema",
1421
+ "location": {
1422
+ "filePath": "worker.main.runtime.ts",
1423
+ "line": 60,
1424
+ "character": 84
1425
+ },
1426
+ "name": "WorkerNameSlot"
1427
+ }
1428
+ ]
1429
+ },
1430
+ "isOptional": false,
1431
+ "isSpread": false
1432
+ }
1433
+ ],
1434
+ "returnType": {
1435
+ "__schema": "InferenceTypeSchema",
1436
+ "location": {
1437
+ "filePath": "worker.main.runtime.ts",
1438
+ "line": 60,
1439
+ "character": 3
1440
+ },
1441
+ "type": "Promise<WorkerMain>"
1442
+ },
1443
+ "modifiers": [
1444
+ "static",
1445
+ "async"
1446
+ ]
1447
+ }
1448
+ ],
1449
+ "extendsNodes": [],
1450
+ "implementNodes": []
1451
+ }
1452
+ ],
1453
+ "internals": [
1454
+ {
1455
+ "__schema": "UnImplementedSchema",
1456
+ "location": {
1457
+ "filePath": "worker.main.runtime.ts",
1458
+ "line": 65,
1459
+ "character": 1
1460
+ },
1461
+ "name": "WorkerAspect.addRuntime(WorkerMain);",
1462
+ "type": "ExpressionStatement"
1463
+ }
1464
+ ]
1465
+ },
1466
+ {
1467
+ "__schema": "ModuleSchema",
1468
+ "location": {
1469
+ "filePath": "harmony-worker.ts",
1470
+ "line": 2,
1471
+ "character": 1
1472
+ },
1473
+ "exports": [
1474
+ {
1475
+ "__schema": "TypeSchema",
1476
+ "location": {
1477
+ "filePath": "harmony-worker.ts",
1478
+ "line": 6,
1479
+ "character": 1
1480
+ },
1481
+ "signature": "type InitOptions = {\n stdout: boolean;\n stderr: boolean;\n stdin: boolean;\n}",
1482
+ "name": "InitOptions",
1483
+ "type": {
1484
+ "__schema": "TypeLiteralSchema",
1485
+ "location": {
1486
+ "filePath": "harmony-worker.ts",
1487
+ "line": 6,
1488
+ "character": 27
1489
+ },
1490
+ "members": [
1491
+ {
1492
+ "__schema": "VariableLikeSchema",
1493
+ "location": {
1494
+ "filePath": "harmony-worker.ts",
1495
+ "line": 11,
1496
+ "character": 3
1497
+ },
1498
+ "doc": {
1499
+ "__schema": "DocSchema",
1500
+ "location": {
1501
+ "filePath": "harmony-worker.ts",
1502
+ "line": 7,
1503
+ "character": 3
1504
+ },
1505
+ "raw": "/**\n * Determines whether stdout should be piped into the parent process.\n * If this is set to true, then worker.stdout is NOT automatically piped through to process.stdout in the parent.\n */",
1506
+ "comment": "Determines whether stdout should be piped into the parent process.\nIf this is set to true, then worker.stdout is NOT automatically piped through to process.stdout in the parent.",
1507
+ "tags": []
1508
+ },
1509
+ "signature": "(property) stdout: boolean",
1510
+ "name": "stdout",
1511
+ "type": {
1512
+ "__schema": "KeywordTypeSchema",
1513
+ "location": {
1514
+ "filePath": "harmony-worker.ts",
1515
+ "line": 11,
1516
+ "character": 11
1517
+ },
1518
+ "name": "boolean"
1519
+ },
1520
+ "isOptional": false
1521
+ },
1522
+ {
1523
+ "__schema": "VariableLikeSchema",
1524
+ "location": {
1525
+ "filePath": "harmony-worker.ts",
1526
+ "line": 17,
1527
+ "character": 3
1528
+ },
1529
+ "doc": {
1530
+ "__schema": "DocSchema",
1531
+ "location": {
1532
+ "filePath": "harmony-worker.ts",
1533
+ "line": 13,
1534
+ "character": 3
1535
+ },
1536
+ "raw": "/**\n * Determines whether stderr should be piped into the parent process.\n * If this is set to true, then worker.stderr is NOT automatically piped through to process.stderr in the parent.\n */",
1537
+ "comment": "Determines whether stderr should be piped into the parent process.\nIf this is set to true, then worker.stderr is NOT automatically piped through to process.stderr in the parent.",
1538
+ "tags": []
1539
+ },
1540
+ "signature": "(property) stderr: boolean",
1541
+ "name": "stderr",
1542
+ "type": {
1543
+ "__schema": "KeywordTypeSchema",
1544
+ "location": {
1545
+ "filePath": "harmony-worker.ts",
1546
+ "line": 17,
1547
+ "character": 11
1548
+ },
1549
+ "name": "boolean"
1550
+ },
1551
+ "isOptional": false
1552
+ },
1553
+ {
1554
+ "__schema": "VariableLikeSchema",
1555
+ "location": {
1556
+ "filePath": "harmony-worker.ts",
1557
+ "line": 24,
1558
+ "character": 3
1559
+ },
1560
+ "doc": {
1561
+ "__schema": "DocSchema",
1562
+ "location": {
1563
+ "filePath": "harmony-worker.ts",
1564
+ "line": 19,
1565
+ "character": 3
1566
+ },
1567
+ "raw": "/**\n * Determines whether stdin should be piped into the parent process.\n * If this is set to true, then worker.stdin provides a writable stream whose contents appear as process.stdin inside\n * the Worker. By default, no data is provided.\n */",
1568
+ "comment": "Determines whether stdin should be piped into the parent process.\nIf this is set to true, then worker.stdin provides a writable stream whose contents appear as process.stdin inside\nthe Worker. By default, no data is provided.",
1569
+ "tags": []
1570
+ },
1571
+ "signature": "(property) stdin: boolean",
1572
+ "name": "stdin",
1573
+ "type": {
1574
+ "__schema": "KeywordTypeSchema",
1575
+ "location": {
1576
+ "filePath": "harmony-worker.ts",
1577
+ "line": 24,
1578
+ "character": 10
1579
+ },
1580
+ "name": "boolean"
1581
+ },
1582
+ "isOptional": false
1583
+ }
1584
+ ]
1585
+ }
1586
+ },
1587
+ {
1588
+ "__schema": "ClassSchema",
1589
+ "location": {
1590
+ "filePath": "harmony-worker.ts",
1591
+ "line": 27,
1592
+ "character": 1
1593
+ },
1594
+ "signature": "class HarmonyWorker<T>",
1595
+ "name": "HarmonyWorker",
1596
+ "members": [
1597
+ {
1598
+ "__schema": "ConstructorSchema",
1599
+ "location": {
1600
+ "filePath": "harmony-worker.ts",
1601
+ "line": 28,
1602
+ "character": 3
1603
+ },
1604
+ "signature": "constructor HarmonyWorker<T>(name: string, workerPath: string): HarmonyWorker<T>",
1605
+ "name": "constructor",
1606
+ "params": [
1607
+ {
1608
+ "__schema": "ParameterSchema",
1609
+ "location": {
1610
+ "filePath": "harmony-worker.ts",
1611
+ "line": 29,
1612
+ "character": 5
1613
+ },
1614
+ "name": "name",
1615
+ "type": {
1616
+ "__schema": "KeywordTypeSchema",
1617
+ "location": {
1618
+ "filePath": "harmony-worker.ts",
1619
+ "line": 29,
1620
+ "character": 20
1621
+ },
1622
+ "name": "string"
1623
+ },
1624
+ "isOptional": false,
1625
+ "isSpread": false
1626
+ },
1627
+ {
1628
+ "__schema": "ParameterSchema",
1629
+ "location": {
1630
+ "filePath": "harmony-worker.ts",
1631
+ "line": 30,
1632
+ "character": 5
1633
+ },
1634
+ "name": "workerPath",
1635
+ "type": {
1636
+ "__schema": "KeywordTypeSchema",
1637
+ "location": {
1638
+ "filePath": "harmony-worker.ts",
1639
+ "line": 30,
1640
+ "character": 26
1641
+ },
1642
+ "name": "string"
1643
+ },
1644
+ "isOptional": false,
1645
+ "isSpread": false
1646
+ }
1647
+ ],
1648
+ "returnType": {
1649
+ "__schema": "ThisTypeSchema",
1650
+ "location": {
1651
+ "filePath": "harmony-worker.ts",
1652
+ "line": 27,
1653
+ "character": 1
1654
+ },
1655
+ "name": "HarmonyWorker"
1656
+ },
1657
+ "modifiers": []
1658
+ },
1659
+ {
1660
+ "__schema": "VariableLikeSchema",
1661
+ "location": {
1662
+ "filePath": "harmony-worker.ts",
1663
+ "line": 33,
1664
+ "character": 3
1665
+ },
1666
+ "signature": "(property) HarmonyWorker<T>.remoteWorker: Remote<T> | undefined",
1667
+ "name": "remoteWorker",
1668
+ "type": {
1669
+ "__schema": "TypeUnionSchema",
1670
+ "location": {
1671
+ "filePath": "harmony-worker.ts",
1672
+ "line": 33,
1673
+ "character": 27
1674
+ },
1675
+ "types": [
1676
+ {
1677
+ "__schema": "KeywordTypeSchema",
1678
+ "location": {
1679
+ "filePath": "harmony-worker.ts",
1680
+ "line": 33,
1681
+ "character": 27
1682
+ },
1683
+ "name": "undefined"
1684
+ },
1685
+ {
1686
+ "__schema": "TypeRefSchema",
1687
+ "location": {
1688
+ "filePath": "harmony-worker.ts",
1689
+ "line": 33,
1690
+ "character": 39
1691
+ },
1692
+ "name": "Remote",
1693
+ "typeArgs": [
1694
+ {
1695
+ "__schema": "TypeRefSchema",
1696
+ "location": {
1697
+ "filePath": "harmony-worker.ts",
1698
+ "line": 33,
1699
+ "character": 46
1700
+ },
1701
+ "name": "T"
1702
+ }
1703
+ ]
1704
+ }
1705
+ ]
1706
+ },
1707
+ "isOptional": false
1708
+ },
1709
+ {
1710
+ "__schema": "VariableLikeSchema",
1711
+ "location": {
1712
+ "filePath": "harmony-worker.ts",
1713
+ "line": 35,
1714
+ "character": 3
1715
+ },
1716
+ "signature": "(property) HarmonyWorker<T>.worker: Worker | undefined",
1717
+ "name": "worker",
1718
+ "type": {
1719
+ "__schema": "TypeUnionSchema",
1720
+ "location": {
1721
+ "filePath": "harmony-worker.ts",
1722
+ "line": 35,
1723
+ "character": 21
1724
+ },
1725
+ "types": [
1726
+ {
1727
+ "__schema": "TypeRefSchema",
1728
+ "location": {
1729
+ "filePath": "harmony-worker.ts",
1730
+ "line": 35,
1731
+ "character": 21
1732
+ },
1733
+ "name": "Worker"
1734
+ },
1735
+ {
1736
+ "__schema": "KeywordTypeSchema",
1737
+ "location": {
1738
+ "filePath": "harmony-worker.ts",
1739
+ "line": 35,
1740
+ "character": 30
1741
+ },
1742
+ "name": "undefined"
1743
+ }
1744
+ ]
1745
+ },
1746
+ "isOptional": false
1747
+ },
1748
+ {
1749
+ "__schema": "GetAccessorSchema",
1750
+ "location": {
1751
+ "filePath": "harmony-worker.ts",
1752
+ "line": 37,
1753
+ "character": 3
1754
+ },
1755
+ "signature": "(getter) HarmonyWorker<T>.stdout: internal.Readable | undefined",
1756
+ "name": "stdout",
1757
+ "type": {
1758
+ "__schema": "InferenceTypeSchema",
1759
+ "location": {
1760
+ "filePath": "harmony-worker.ts",
1761
+ "line": 37,
1762
+ "character": 3
1763
+ },
1764
+ "type": "internal.Readable | undefined"
1765
+ }
1766
+ },
1767
+ {
1768
+ "__schema": "GetAccessorSchema",
1769
+ "location": {
1770
+ "filePath": "harmony-worker.ts",
1771
+ "line": 41,
1772
+ "character": 3
1773
+ },
1774
+ "signature": "(getter) HarmonyWorker<T>.stderr: internal.Readable | undefined",
1775
+ "name": "stderr",
1776
+ "type": {
1777
+ "__schema": "InferenceTypeSchema",
1778
+ "location": {
1779
+ "filePath": "harmony-worker.ts",
1780
+ "line": 41,
1781
+ "character": 3
1782
+ },
1783
+ "type": "internal.Readable | undefined"
1784
+ }
1785
+ },
1786
+ {
1787
+ "__schema": "GetAccessorSchema",
1788
+ "location": {
1789
+ "filePath": "harmony-worker.ts",
1790
+ "line": 45,
1791
+ "character": 3
1792
+ },
1793
+ "signature": "(getter) HarmonyWorker<T>.stdin: internal.Writable | null | undefined",
1794
+ "name": "stdin",
1795
+ "type": {
1796
+ "__schema": "InferenceTypeSchema",
1797
+ "location": {
1798
+ "filePath": "harmony-worker.ts",
1799
+ "line": 45,
1800
+ "character": 3
1801
+ },
1802
+ "type": "internal.Writable | null | undefined"
1803
+ }
1804
+ },
1805
+ {
1806
+ "__schema": "FunctionLikeSchema",
1807
+ "location": {
1808
+ "filePath": "harmony-worker.ts",
1809
+ "line": 59,
1810
+ "character": 3
1811
+ },
1812
+ "signature": "(method) HarmonyWorker<T>.initiate(options: Partial<InitOptions>): Remote<T>",
1813
+ "name": "initiate",
1814
+ "params": [
1815
+ {
1816
+ "__schema": "ParameterSchema",
1817
+ "location": {
1818
+ "filePath": "harmony-worker.ts",
1819
+ "line": 59,
1820
+ "character": 12
1821
+ },
1822
+ "name": "options",
1823
+ "type": {
1824
+ "__schema": "TypeRefSchema",
1825
+ "location": {
1826
+ "filePath": "harmony-worker.ts",
1827
+ "line": 59,
1828
+ "character": 21
1829
+ },
1830
+ "name": "Partial",
1831
+ "typeArgs": [
1832
+ {
1833
+ "__schema": "TypeRefSchema",
1834
+ "location": {
1835
+ "filePath": "harmony-worker.ts",
1836
+ "line": 59,
1837
+ "character": 29
1838
+ },
1839
+ "name": "InitOptions"
1840
+ }
1841
+ ]
1842
+ },
1843
+ "isOptional": false,
1844
+ "isSpread": false
1845
+ }
1846
+ ],
1847
+ "returnType": {
1848
+ "__schema": "TypeRefSchema",
1849
+ "location": {
1850
+ "filePath": "harmony-worker.ts",
1851
+ "line": 59,
1852
+ "character": 44
1853
+ },
1854
+ "name": "Remote",
1855
+ "typeArgs": [
1856
+ {
1857
+ "__schema": "TypeRefSchema",
1858
+ "location": {
1859
+ "filePath": "harmony-worker.ts",
1860
+ "line": 59,
1861
+ "character": 51
1862
+ },
1863
+ "name": "T"
1864
+ }
1865
+ ]
1866
+ },
1867
+ "modifiers": []
1868
+ },
1869
+ {
1870
+ "__schema": "FunctionLikeSchema",
1871
+ "location": {
1872
+ "filePath": "harmony-worker.ts",
1873
+ "line": 67,
1874
+ "character": 3
1875
+ },
1876
+ "signature": "(method) HarmonyWorker<T>.get(): Remote<T> | undefined",
1877
+ "name": "get",
1878
+ "params": [],
1879
+ "returnType": {
1880
+ "__schema": "InferenceTypeSchema",
1881
+ "location": {
1882
+ "filePath": "harmony-worker.ts",
1883
+ "line": 67,
1884
+ "character": 3
1885
+ },
1886
+ "type": "Remote<T> | undefined"
1887
+ },
1888
+ "modifiers": []
1889
+ },
1890
+ {
1891
+ "__schema": "FunctionLikeSchema",
1892
+ "location": {
1893
+ "filePath": "harmony-worker.ts",
1894
+ "line": 71,
1895
+ "character": 3
1896
+ },
1897
+ "signature": "(method) HarmonyWorker<T>.terminate(): Promise<void>",
1898
+ "name": "terminate",
1899
+ "params": [],
1900
+ "returnType": {
1901
+ "__schema": "InferenceTypeSchema",
1902
+ "location": {
1903
+ "filePath": "harmony-worker.ts",
1904
+ "line": 71,
1905
+ "character": 3
1906
+ },
1907
+ "type": "Promise<void>"
1908
+ },
1909
+ "modifiers": [
1910
+ "async"
1911
+ ]
1912
+ }
1913
+ ],
1914
+ "typeParams": [
1915
+ "T"
1916
+ ],
1917
+ "extendsNodes": [],
1918
+ "implementNodes": []
1919
+ }
1920
+ ],
1921
+ "internals": []
1922
+ }
1923
+ ],
1924
+ "componentId": {
1925
+ "scope": "teambit.harmony",
1926
+ "name": "worker",
1927
+ "version": "0.0.1394"
1928
+ },
1929
+ "taggedModuleExports": []
1930
+ }