@teambit/pubsub 1.0.511 → 1.0.513

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