@teambit/pubsub 1.0.512 → 1.0.514

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