@teambit/schema 0.0.737 → 0.0.740

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.
Files changed (38) hide show
  1. package/dist/exceptions/index.js.map +1 -1
  2. package/dist/exceptions/parser-not-found.js.map +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/mock/button/button.composition.d.ts +5 -0
  5. package/dist/mock/button/button.composition.js +63 -0
  6. package/dist/mock/button/button.composition.js.map +1 -0
  7. package/dist/mock/button/button.d.ts +20 -0
  8. package/dist/mock/button/button.js +97 -0
  9. package/dist/mock/button/button.js.map +1 -0
  10. package/dist/mock/button/index.d.ts +70 -0
  11. package/dist/mock/button/index.js +211 -0
  12. package/dist/mock/button/index.js.map +1 -0
  13. package/dist/mock/button-schemas.json +1311 -0
  14. package/dist/parser.js.map +1 -1
  15. package/dist/schema-extract.task.js.map +1 -1
  16. package/dist/schema-extractor.js.map +1 -1
  17. package/dist/schema.aspect.js.map +1 -1
  18. package/dist/schema.cmd.js.map +1 -1
  19. package/dist/schema.composition.js.map +1 -1
  20. package/dist/schema.graphql.d.ts +1 -0
  21. package/dist/schema.graphql.js +13 -5
  22. package/dist/schema.graphql.js.map +1 -1
  23. package/dist/schema.main.runtime.d.ts +2 -0
  24. package/dist/schema.main.runtime.js +18 -1
  25. package/dist/schema.main.runtime.js.map +1 -1
  26. package/dist/schema.service.js.map +1 -1
  27. package/dist/schema.spec.d.ts +1 -0
  28. package/dist/schema.spec.js +148 -0
  29. package/dist/schema.spec.js.map +1 -0
  30. package/mock/button/button.composition.tsx +25 -0
  31. package/mock/button/button.tsx +63 -0
  32. package/mock/button/index.ts +111 -0
  33. package/mock/button-schemas.json +1311 -0
  34. package/package-tar/teambit-schema-0.0.740.tgz +0 -0
  35. package/package.json +19 -12
  36. package/preview-1653449228788.js +2 -0
  37. package/package-tar/teambit-schema-0.0.737.tgz +0 -0
  38. package/preview-1652930732694.js +0 -2
@@ -0,0 +1,1311 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "file": "index.ts",
5
+ "line": 13,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "Module",
10
+ "location": {
11
+ "file": "index.ts",
12
+ "line": 13,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "FunctionLikeSchema",
18
+ "location": {
19
+ "file": "index.ts",
20
+ "line": 13,
21
+ "character": 1
22
+ },
23
+ "name": "myFunc",
24
+ "signature": "function myFunc(a?: number, b?: number): number",
25
+ "modifiers": [
26
+ "export"
27
+ ],
28
+ "params": [
29
+ {
30
+ "__schema": "ParameterSchema",
31
+ "location": {
32
+ "file": "index.ts",
33
+ "line": 13,
34
+ "character": 24
35
+ },
36
+ "name": "a",
37
+ "defaultValue": "4",
38
+ "type": {
39
+ "__schema": "InferenceTypeSchema",
40
+ "location": {
41
+ "file": "index.ts",
42
+ "line": 13,
43
+ "character": 24
44
+ },
45
+ "type": "number"
46
+ }
47
+ },
48
+ {
49
+ "__schema": "ParameterSchema",
50
+ "location": {
51
+ "file": "index.ts",
52
+ "line": 13,
53
+ "character": 31
54
+ },
55
+ "name": "b",
56
+ "defaultValue": "5",
57
+ "type": {
58
+ "__schema": "InferenceTypeSchema",
59
+ "location": {
60
+ "file": "index.ts",
61
+ "line": 13,
62
+ "character": 31
63
+ },
64
+ "type": "number"
65
+ }
66
+ }
67
+ ],
68
+ "returnType": {
69
+ "__schema": "KeywordTypeSchema",
70
+ "location": {
71
+ "file": "index.ts",
72
+ "line": 13,
73
+ "character": 39
74
+ },
75
+ "name": "number"
76
+ }
77
+ },
78
+ {
79
+ "__schema": "TypeSchema",
80
+ "location": {
81
+ "file": "button.tsx",
82
+ "line": 7,
83
+ "character": 1
84
+ },
85
+ "name": "ButtonElementType",
86
+ "signature": "type ButtonElementType = \"a\" | \"button\"",
87
+ "type": {
88
+ "__schema": "TypeUnionSchema",
89
+ "location": {
90
+ "file": "button.tsx",
91
+ "line": 7,
92
+ "character": 33
93
+ },
94
+ "types": [
95
+ {
96
+ "__schema": "LiteralTypeSchema",
97
+ "location": {
98
+ "file": "button.tsx",
99
+ "line": 7,
100
+ "character": 33
101
+ },
102
+ "name": "'a'"
103
+ },
104
+ {
105
+ "__schema": "LiteralTypeSchema",
106
+ "location": {
107
+ "file": "button.tsx",
108
+ "line": 7,
109
+ "character": 39
110
+ },
111
+ "name": "'button'"
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ "__schema": "TypeSchema",
118
+ "location": {
119
+ "file": "button.tsx",
120
+ "line": 9,
121
+ "character": 1
122
+ },
123
+ "name": "ButtonProps",
124
+ "signature": "type ButtonProps = any",
125
+ "type": {
126
+ "__schema": "TypeIntersectionSchema",
127
+ "location": {
128
+ "file": "button.tsx",
129
+ "line": 9,
130
+ "character": 27
131
+ },
132
+ "types": [
133
+ {
134
+ "__schema": "TypeLiteralSchema",
135
+ "location": {
136
+ "file": "button.tsx",
137
+ "line": 9,
138
+ "character": 27
139
+ },
140
+ "members": [
141
+ {
142
+ "__schema": "VariableSchema",
143
+ "location": {
144
+ "file": "button.tsx",
145
+ "line": 13,
146
+ "character": 3
147
+ },
148
+ "name": "children",
149
+ "signature": "(property) children: any",
150
+ "type": {
151
+ "__schema": "InferenceTypeSchema",
152
+ "location": {
153
+ "file": "button.tsx",
154
+ "line": 13,
155
+ "character": 13
156
+ }
157
+ }
158
+ },
159
+ {
160
+ "__schema": "VariableSchema",
161
+ "location": {
162
+ "file": "button.tsx",
163
+ "line": 18,
164
+ "character": 3
165
+ },
166
+ "name": "href",
167
+ "signature": "(property) href?: string",
168
+ "type": {
169
+ "__schema": "KeywordTypeSchema",
170
+ "location": {
171
+ "file": "button.tsx",
172
+ "line": 18,
173
+ "character": 10
174
+ },
175
+ "name": "string"
176
+ }
177
+ },
178
+ {
179
+ "__schema": "VariableSchema",
180
+ "location": {
181
+ "file": "button.tsx",
182
+ "line": 23,
183
+ "character": 3
184
+ },
185
+ "name": "className",
186
+ "signature": "(property) className?: string",
187
+ "type": {
188
+ "__schema": "KeywordTypeSchema",
189
+ "location": {
190
+ "file": "button.tsx",
191
+ "line": 23,
192
+ "character": 15
193
+ },
194
+ "name": "string"
195
+ }
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "__schema": "InferenceTypeSchema",
201
+ "location": {
202
+ "file": "button.tsx",
203
+ "line": 24,
204
+ "character": 5
205
+ }
206
+ }
207
+ ]
208
+ }
209
+ },
210
+ {
211
+ "__schema": "FunctionLikeSchema",
212
+ "location": {
213
+ "file": "button.tsx",
214
+ "line": 26,
215
+ "character": 1
216
+ },
217
+ "name": "Button",
218
+ "signature": "function Button(props: ButtonProps): any",
219
+ "modifiers": [
220
+ "export"
221
+ ],
222
+ "params": [
223
+ {
224
+ "__schema": "ParameterSchema",
225
+ "location": {
226
+ "file": "button.tsx",
227
+ "line": 26,
228
+ "character": 24
229
+ },
230
+ "name": "props",
231
+ "type": {
232
+ "__schema": "TypeRefSchema",
233
+ "location": {
234
+ "file": "button.tsx",
235
+ "line": 26,
236
+ "character": 31
237
+ },
238
+ "name": "ButtonProps"
239
+ }
240
+ }
241
+ ],
242
+ "returnType": {
243
+ "__schema": "InferenceTypeSchema",
244
+ "location": {
245
+ "file": "button.tsx",
246
+ "line": 26,
247
+ "character": 1
248
+ },
249
+ "type": "any"
250
+ }
251
+ },
252
+ {
253
+ "__schema": "ClassSchema",
254
+ "className": "Bar",
255
+ "location": {
256
+ "file": "button.tsx",
257
+ "line": 61,
258
+ "character": 1
259
+ },
260
+ "members": [
261
+ {
262
+ "__schema": "FunctionLikeSchema",
263
+ "location": {
264
+ "file": "button.tsx",
265
+ "line": 62,
266
+ "character": 3
267
+ },
268
+ "name": "foo",
269
+ "signature": "(method) Bar.foo(): void",
270
+ "modifiers": [],
271
+ "params": [],
272
+ "returnType": {
273
+ "__schema": "InferenceTypeSchema",
274
+ "location": {
275
+ "file": "button.tsx",
276
+ "line": 62,
277
+ "character": 3
278
+ },
279
+ "type": "void"
280
+ }
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ "__schema": "FunctionLikeSchema",
286
+ "location": {
287
+ "file": "index.ts",
288
+ "line": 23,
289
+ "character": 1
290
+ },
291
+ "name": "Hi",
292
+ "signature": "function Hi(): void",
293
+ "modifiers": [
294
+ "export"
295
+ ],
296
+ "params": [],
297
+ "returnType": {
298
+ "__schema": "InferenceTypeSchema",
299
+ "location": {
300
+ "file": "index.ts",
301
+ "line": 23,
302
+ "character": 1
303
+ },
304
+ "type": "void"
305
+ }
306
+ },
307
+ {
308
+ "__schema": "VariableSchema",
309
+ "location": {
310
+ "file": "index.ts",
311
+ "line": 25,
312
+ "character": 14
313
+ },
314
+ "name": "a",
315
+ "signature": "const a: 4",
316
+ "type": {
317
+ "__schema": "InferenceTypeSchema",
318
+ "location": {
319
+ "file": "index.ts",
320
+ "line": 25,
321
+ "character": 14
322
+ },
323
+ "type": "4"
324
+ }
325
+ },
326
+ {
327
+ "__schema": "VariableSchema",
328
+ "location": {
329
+ "file": "index.ts",
330
+ "line": 26,
331
+ "character": 3
332
+ },
333
+ "name": "b",
334
+ "signature": "const b: 5",
335
+ "type": {
336
+ "__schema": "LiteralTypeSchema",
337
+ "location": {
338
+ "file": "index.ts",
339
+ "line": 26,
340
+ "character": 6
341
+ },
342
+ "name": "5"
343
+ }
344
+ },
345
+ {
346
+ "__schema": "Module",
347
+ "location": {
348
+ "file": "button.composition.tsx",
349
+ "line": 3,
350
+ "character": 1
351
+ },
352
+ "exports": [
353
+ {
354
+ "__schema": "FunctionLikeSchema",
355
+ "location": {
356
+ "file": "button.composition.tsx",
357
+ "line": 6,
358
+ "character": 14
359
+ },
360
+ "name": "BasicButton",
361
+ "signature": "const BasicButton: () => any",
362
+ "modifiers": [],
363
+ "params": [],
364
+ "returnType": {
365
+ "__schema": "InferenceTypeSchema",
366
+ "location": {
367
+ "file": "button.composition.tsx",
368
+ "line": 6,
369
+ "character": 14
370
+ },
371
+ "type": "any"
372
+ }
373
+ },
374
+ {
375
+ "__schema": "FunctionLikeSchema",
376
+ "location": {
377
+ "file": "button.composition.tsx",
378
+ "line": 10,
379
+ "character": 14
380
+ },
381
+ "name": "ButtonWithCustomStyles",
382
+ "signature": "const ButtonWithCustomStyles: () => any",
383
+ "modifiers": [],
384
+ "params": [],
385
+ "returnType": {
386
+ "__schema": "InferenceTypeSchema",
387
+ "location": {
388
+ "file": "button.composition.tsx",
389
+ "line": 10,
390
+ "character": 14
391
+ },
392
+ "type": "any"
393
+ }
394
+ },
395
+ {
396
+ "__schema": "FunctionLikeSchema",
397
+ "location": {
398
+ "file": "button.composition.tsx",
399
+ "line": 14,
400
+ "character": 14
401
+ },
402
+ "name": "ButtonWithIcon",
403
+ "signature": "const ButtonWithIcon: () => any",
404
+ "modifiers": [],
405
+ "params": [],
406
+ "returnType": {
407
+ "__schema": "InferenceTypeSchema",
408
+ "location": {
409
+ "file": "button.composition.tsx",
410
+ "line": 14,
411
+ "character": 14
412
+ },
413
+ "type": "any"
414
+ }
415
+ },
416
+ {
417
+ "__schema": "FunctionLikeSchema",
418
+ "location": {
419
+ "file": "button.composition.tsx",
420
+ "line": 23,
421
+ "character": 14
422
+ },
423
+ "name": "ButtonAsALink",
424
+ "signature": "const ButtonAsALink: () => any",
425
+ "modifiers": [],
426
+ "params": [],
427
+ "returnType": {
428
+ "__schema": "InferenceTypeSchema",
429
+ "location": {
430
+ "file": "button.composition.tsx",
431
+ "line": 23,
432
+ "character": 14
433
+ },
434
+ "type": "any"
435
+ }
436
+ }
437
+ ],
438
+ "namespace": "Compositions"
439
+ },
440
+ {
441
+ "__schema": "VariableSchema",
442
+ "location": {
443
+ "file": "index.ts",
444
+ "line": 30,
445
+ "character": 14
446
+ },
447
+ "name": "HiThere",
448
+ "signature": "const HiThere: \"HiThere\"",
449
+ "type": {
450
+ "__schema": "InferenceTypeSchema",
451
+ "location": {
452
+ "file": "index.ts",
453
+ "line": 30,
454
+ "character": 14
455
+ },
456
+ "type": "\"HiThere\""
457
+ }
458
+ },
459
+ {
460
+ "__schema": "FunctionLikeSchema",
461
+ "location": {
462
+ "file": "index.ts",
463
+ "line": 32,
464
+ "character": 14
465
+ },
466
+ "name": "Function",
467
+ "signature": "const Function: () => void",
468
+ "modifiers": [],
469
+ "params": [],
470
+ "returnType": {
471
+ "__schema": "InferenceTypeSchema",
472
+ "location": {
473
+ "file": "index.ts",
474
+ "line": 32,
475
+ "character": 14
476
+ },
477
+ "type": "void"
478
+ }
479
+ },
480
+ {
481
+ "__schema": "VariableSchema",
482
+ "location": {
483
+ "file": "index.ts",
484
+ "line": 34,
485
+ "character": 14
486
+ },
487
+ "name": "Array",
488
+ "signature": "const Array: string[]",
489
+ "type": {
490
+ "__schema": "TypeRefSchema",
491
+ "location": {
492
+ "file": "index.ts",
493
+ "line": 34,
494
+ "character": 14
495
+ },
496
+ "name": "string[]",
497
+ "packageName": ""
498
+ }
499
+ },
500
+ {
501
+ "__schema": "ClassSchema",
502
+ "className": "ClassSomething",
503
+ "location": {
504
+ "file": "index.ts",
505
+ "line": 38,
506
+ "character": 1
507
+ },
508
+ "members": [
509
+ {
510
+ "__schema": "VariableSchema",
511
+ "location": {
512
+ "file": "index.ts",
513
+ "line": 39,
514
+ "character": 3
515
+ },
516
+ "name": "app",
517
+ "signature": "(property) ClassSomething.app: string",
518
+ "type": {
519
+ "__schema": "InferenceTypeSchema",
520
+ "location": {
521
+ "file": "index.ts",
522
+ "line": 39,
523
+ "character": 3
524
+ },
525
+ "type": "string"
526
+ }
527
+ },
528
+ {
529
+ "__schema": "ConstructorSchema",
530
+ "location": {
531
+ "file": "index.ts",
532
+ "line": 40,
533
+ "character": 3
534
+ },
535
+ "params": [
536
+ {
537
+ "__schema": "ParameterSchema",
538
+ "location": {
539
+ "file": "index.ts",
540
+ "line": 40,
541
+ "character": 15
542
+ },
543
+ "name": "da",
544
+ "type": {
545
+ "__schema": "LiteralTypeSchema",
546
+ "location": {
547
+ "file": "index.ts",
548
+ "line": 40,
549
+ "character": 28
550
+ },
551
+ "name": "'dsa'"
552
+ }
553
+ }
554
+ ]
555
+ },
556
+ {
557
+ "__schema": "FunctionLikeSchema",
558
+ "location": {
559
+ "file": "index.ts",
560
+ "line": 42,
561
+ "character": 3
562
+ },
563
+ "name": "a",
564
+ "signature": "(method) ClassSomething.a(): Foo",
565
+ "modifiers": [],
566
+ "params": [],
567
+ "returnType": {
568
+ "__schema": "InferenceTypeSchema",
569
+ "location": {
570
+ "file": "index.ts",
571
+ "line": 42,
572
+ "character": 3
573
+ },
574
+ "type": "Foo"
575
+ }
576
+ },
577
+ {
578
+ "__schema": "GetAccessorSchema",
579
+ "location": {
580
+ "file": "index.ts",
581
+ "line": 45,
582
+ "character": 3
583
+ },
584
+ "name": "getter",
585
+ "signature": "(property) ClassSomething.getter: string",
586
+ "type": {
587
+ "__schema": "InferenceTypeSchema",
588
+ "location": {
589
+ "file": "index.ts",
590
+ "line": 45,
591
+ "character": 3
592
+ },
593
+ "type": "string"
594
+ }
595
+ },
596
+ {
597
+ "__schema": "SetAccessorSchema",
598
+ "location": {
599
+ "file": "index.ts",
600
+ "line": 49,
601
+ "character": 3
602
+ },
603
+ "name": "setter",
604
+ "signature": "(property) ClassSomething.setter: boolean",
605
+ "param": {
606
+ "__schema": "ParameterSchema",
607
+ "location": {
608
+ "file": "index.ts",
609
+ "line": 49,
610
+ "character": 14
611
+ },
612
+ "name": "a",
613
+ "type": {
614
+ "__schema": "KeywordTypeSchema",
615
+ "location": {
616
+ "file": "index.ts",
617
+ "line": 49,
618
+ "character": 17
619
+ },
620
+ "name": "boolean"
621
+ }
622
+ }
623
+ }
624
+ ]
625
+ },
626
+ {
627
+ "__schema": "TypeSchema",
628
+ "location": {
629
+ "file": "index.ts",
630
+ "line": 54,
631
+ "character": 1
632
+ },
633
+ "name": "IndexSig",
634
+ "signature": "type IndexSig = {\n [key: string]: boolean;\n}",
635
+ "type": {
636
+ "__schema": "TypeLiteralSchema",
637
+ "location": {
638
+ "file": "index.ts",
639
+ "line": 54,
640
+ "character": 24
641
+ },
642
+ "members": [
643
+ {
644
+ "__schema": "IndexSignatureSchema",
645
+ "location": {
646
+ "file": "index.ts",
647
+ "line": 54,
648
+ "character": 26
649
+ },
650
+ "params": [
651
+ {
652
+ "__schema": "ParameterSchema",
653
+ "location": {
654
+ "file": "index.ts",
655
+ "line": 54,
656
+ "character": 27
657
+ },
658
+ "name": "key",
659
+ "type": {
660
+ "__schema": "KeywordTypeSchema",
661
+ "location": {
662
+ "file": "index.ts",
663
+ "line": 54,
664
+ "character": 32
665
+ },
666
+ "name": "string"
667
+ }
668
+ }
669
+ ],
670
+ "type": {
671
+ "__schema": "KeywordTypeSchema",
672
+ "location": {
673
+ "file": "index.ts",
674
+ "line": 54,
675
+ "character": 41
676
+ },
677
+ "name": "boolean"
678
+ }
679
+ }
680
+ ]
681
+ }
682
+ },
683
+ {
684
+ "__schema": "InterfaceSchema",
685
+ "location": {
686
+ "file": "index.ts",
687
+ "line": 56,
688
+ "character": 1
689
+ },
690
+ "name": "Hello",
691
+ "members": [
692
+ {
693
+ "__schema": "FunctionLikeSchema",
694
+ "location": {
695
+ "file": "index.ts",
696
+ "line": 57,
697
+ "character": 16
698
+ },
699
+ "name": "",
700
+ "signature": "",
701
+ "modifiers": [],
702
+ "params": [],
703
+ "returnType": {
704
+ "__schema": "KeywordTypeSchema",
705
+ "location": {
706
+ "file": "index.ts",
707
+ "line": 57,
708
+ "character": 22
709
+ },
710
+ "name": "void"
711
+ }
712
+ },
713
+ {
714
+ "__schema": "FunctionLikeSchema",
715
+ "location": {
716
+ "file": "index.ts",
717
+ "line": 58,
718
+ "character": 3
719
+ },
720
+ "name": "methodSig",
721
+ "signature": "(method) Hello.methodSig(): string",
722
+ "modifiers": [],
723
+ "params": [],
724
+ "returnType": {
725
+ "__schema": "KeywordTypeSchema",
726
+ "location": {
727
+ "file": "index.ts",
728
+ "line": 58,
729
+ "character": 16
730
+ },
731
+ "name": "string"
732
+ }
733
+ }
734
+ ]
735
+ },
736
+ {
737
+ "__schema": "VariableSchema",
738
+ "location": {
739
+ "file": "index.ts",
740
+ "line": 66,
741
+ "character": 14
742
+ },
743
+ "name": "a1",
744
+ "signature": "const a1: {\n a: number;\n b: number;\n}",
745
+ "type": {
746
+ "__schema": "TypeQuerySchema",
747
+ "location": {
748
+ "file": "index.ts",
749
+ "line": 66,
750
+ "character": 18
751
+ },
752
+ "signature": "const obj: {\n a: number;\n b: number;\n}",
753
+ "type": {
754
+ "__schema": "InferenceTypeSchema",
755
+ "location": {
756
+ "file": "index.ts",
757
+ "line": 66,
758
+ "character": 25
759
+ },
760
+ "type": "{\n a: number;\n b: number;\n}"
761
+ }
762
+ }
763
+ },
764
+ {
765
+ "__schema": "TypeSchema",
766
+ "location": {
767
+ "file": "index.ts",
768
+ "line": 68,
769
+ "character": 1
770
+ },
771
+ "name": "TypeOperator",
772
+ "signature": "type TypeOperator = \"a\" | \"b\"",
773
+ "type": {
774
+ "__schema": "TypeOperatorSchema",
775
+ "location": {
776
+ "file": "index.ts",
777
+ "line": 68,
778
+ "character": 28
779
+ },
780
+ "operatorName": "keyof",
781
+ "type": {
782
+ "__schema": "TypeQuerySchema",
783
+ "location": {
784
+ "file": "index.ts",
785
+ "line": 68,
786
+ "character": 34
787
+ },
788
+ "signature": "const obj: {\n a: number;\n b: number;\n}",
789
+ "type": {
790
+ "__schema": "InferenceTypeSchema",
791
+ "location": {
792
+ "file": "index.ts",
793
+ "line": 68,
794
+ "character": 41
795
+ },
796
+ "type": "{\n a: number;\n b: number;\n}"
797
+ }
798
+ }
799
+ }
800
+ },
801
+ {
802
+ "__schema": "FunctionLikeSchema",
803
+ "location": {
804
+ "file": "index.ts",
805
+ "line": 74,
806
+ "character": 14
807
+ },
808
+ "name": "getBar",
809
+ "signature": "const getBar: (bar: Bar) => Bar",
810
+ "modifiers": [],
811
+ "params": [
812
+ {
813
+ "__schema": "ParameterSchema",
814
+ "location": {
815
+ "file": "index.ts",
816
+ "line": 74,
817
+ "character": 24
818
+ },
819
+ "name": "bar",
820
+ "type": {
821
+ "__schema": "TypeRefSchema",
822
+ "location": {
823
+ "file": "index.ts",
824
+ "line": 74,
825
+ "character": 29
826
+ },
827
+ "name": "Bar"
828
+ }
829
+ }
830
+ ],
831
+ "returnType": {
832
+ "__schema": "TypeRefSchema",
833
+ "location": {
834
+ "file": "index.ts",
835
+ "line": 74,
836
+ "character": 14
837
+ },
838
+ "name": "Bar"
839
+ }
840
+ },
841
+ {
842
+ "__schema": "FunctionLikeSchema",
843
+ "location": {
844
+ "file": "index.ts",
845
+ "line": 76,
846
+ "character": 14
847
+ },
848
+ "name": "tuple",
849
+ "signature": "const tuple: ([a, b, c]: [string, Function, Record<string, any>]) => void",
850
+ "modifiers": [],
851
+ "params": [
852
+ {
853
+ "__schema": "ParameterSchema",
854
+ "location": {
855
+ "file": "index.ts",
856
+ "line": 76,
857
+ "character": 23
858
+ },
859
+ "name": "[ a, b, c ]",
860
+ "type": {
861
+ "__schema": "TupleTypeSchema",
862
+ "location": {
863
+ "file": "index.ts",
864
+ "line": 76,
865
+ "character": 34
866
+ },
867
+ "elements": [
868
+ {
869
+ "__schema": "KeywordTypeSchema",
870
+ "location": {
871
+ "file": "index.ts",
872
+ "line": 76,
873
+ "character": 35
874
+ },
875
+ "name": "string"
876
+ },
877
+ {
878
+ "__schema": "TypeRefSchema",
879
+ "location": {
880
+ "file": "index.ts",
881
+ "line": 76,
882
+ "character": 43
883
+ },
884
+ "name": "Function"
885
+ },
886
+ {
887
+ "__schema": "TypeRefSchema",
888
+ "location": {
889
+ "file": "index.ts",
890
+ "line": 76,
891
+ "character": 53
892
+ },
893
+ "name": "Record",
894
+ "packageName": "",
895
+ "typeArgs": [
896
+ {
897
+ "__schema": "KeywordTypeSchema",
898
+ "location": {
899
+ "file": "index.ts",
900
+ "line": 76,
901
+ "character": 60
902
+ },
903
+ "name": "string"
904
+ },
905
+ {
906
+ "__schema": "KeywordTypeSchema",
907
+ "location": {
908
+ "file": "index.ts",
909
+ "line": 76,
910
+ "character": 68
911
+ },
912
+ "name": "any"
913
+ }
914
+ ]
915
+ }
916
+ ]
917
+ }
918
+ }
919
+ ],
920
+ "returnType": {
921
+ "__schema": "InferenceTypeSchema",
922
+ "location": {
923
+ "file": "index.ts",
924
+ "line": 76,
925
+ "character": 14
926
+ },
927
+ "type": "void"
928
+ }
929
+ },
930
+ {
931
+ "__schema": "EnumSchema",
932
+ "location": {
933
+ "file": "index.ts",
934
+ "line": 78,
935
+ "character": 1
936
+ },
937
+ "name": "Food",
938
+ "members": [
939
+ "Falafel",
940
+ "Hummus",
941
+ "Tahini"
942
+ ]
943
+ },
944
+ {
945
+ "__schema": "FunctionLikeSchema",
946
+ "location": {
947
+ "file": "index.ts",
948
+ "line": 84,
949
+ "character": 1
950
+ },
951
+ "name": "getPromise",
952
+ "signature": "function getPromise(): Promise<string>",
953
+ "modifiers": [
954
+ "export",
955
+ "async"
956
+ ],
957
+ "params": [],
958
+ "returnType": {
959
+ "__schema": "TypeRefSchema",
960
+ "location": {
961
+ "file": "index.ts",
962
+ "line": 84,
963
+ "character": 37
964
+ },
965
+ "name": "Promise",
966
+ "packageName": "",
967
+ "typeArgs": [
968
+ {
969
+ "__schema": "KeywordTypeSchema",
970
+ "location": {
971
+ "file": "index.ts",
972
+ "line": 84,
973
+ "character": 45
974
+ },
975
+ "name": "string"
976
+ }
977
+ ]
978
+ }
979
+ },
980
+ {
981
+ "__schema": "TypeSchema",
982
+ "location": {
983
+ "file": "index.ts",
984
+ "line": 91,
985
+ "character": 1
986
+ },
987
+ "name": "TypeRefWithArgs",
988
+ "signature": "type TypeRefWithArgs = T3<T1, T2>",
989
+ "type": {
990
+ "__schema": "InferenceTypeSchema",
991
+ "location": {
992
+ "file": "index.ts",
993
+ "line": 91,
994
+ "character": 31
995
+ },
996
+ "type": "class T3<T, K>"
997
+ }
998
+ },
999
+ {
1000
+ "__schema": "TypeSchema",
1001
+ "location": {
1002
+ "file": "index.ts",
1003
+ "line": 93,
1004
+ "character": 1
1005
+ },
1006
+ "name": "ParenthesizedType",
1007
+ "signature": "type ParenthesizedType = (T1 | T2)[]",
1008
+ "type": {
1009
+ "__schema": "TypeArraySchema",
1010
+ "location": {
1011
+ "file": "index.ts",
1012
+ "line": 93,
1013
+ "character": 33
1014
+ },
1015
+ "type": {
1016
+ "__schema": "ParenthesizedTypeSchema",
1017
+ "location": {
1018
+ "file": "index.ts",
1019
+ "line": 93,
1020
+ "character": 33
1021
+ },
1022
+ "type": {
1023
+ "__schema": "TypeUnionSchema",
1024
+ "location": {
1025
+ "file": "index.ts",
1026
+ "line": 93,
1027
+ "character": 34
1028
+ },
1029
+ "types": [
1030
+ {
1031
+ "__schema": "InferenceTypeSchema",
1032
+ "location": {
1033
+ "file": "index.ts",
1034
+ "line": 93,
1035
+ "character": 34
1036
+ },
1037
+ "type": "class T1"
1038
+ },
1039
+ {
1040
+ "__schema": "InferenceTypeSchema",
1041
+ "location": {
1042
+ "file": "index.ts",
1043
+ "line": 93,
1044
+ "character": 39
1045
+ },
1046
+ "type": "class T2"
1047
+ }
1048
+ ]
1049
+ }
1050
+ }
1051
+ }
1052
+ },
1053
+ {
1054
+ "__schema": "FunctionLikeSchema",
1055
+ "location": {
1056
+ "file": "index.ts",
1057
+ "line": 95,
1058
+ "character": 1
1059
+ },
1060
+ "name": "typePredicateFn",
1061
+ "signature": "function typePredicateFn(str: any): str is string",
1062
+ "modifiers": [
1063
+ "export"
1064
+ ],
1065
+ "params": [
1066
+ {
1067
+ "__schema": "ParameterSchema",
1068
+ "location": {
1069
+ "file": "index.ts",
1070
+ "line": 95,
1071
+ "character": 33
1072
+ },
1073
+ "name": "str",
1074
+ "type": {
1075
+ "__schema": "KeywordTypeSchema",
1076
+ "location": {
1077
+ "file": "index.ts",
1078
+ "line": 95,
1079
+ "character": 38
1080
+ },
1081
+ "name": "any"
1082
+ }
1083
+ }
1084
+ ],
1085
+ "returnType": {
1086
+ "__schema": "TypePredicateSchema",
1087
+ "location": {
1088
+ "file": "index.ts",
1089
+ "line": 95,
1090
+ "character": 44
1091
+ },
1092
+ "parameterName": "str",
1093
+ "hasAssertsModifier": false,
1094
+ "type": {
1095
+ "__schema": "KeywordTypeSchema",
1096
+ "location": {
1097
+ "file": "index.ts",
1098
+ "line": 95,
1099
+ "character": 51
1100
+ },
1101
+ "name": "string"
1102
+ }
1103
+ }
1104
+ },
1105
+ {
1106
+ "__schema": "FunctionLikeSchema",
1107
+ "location": {
1108
+ "file": "index.ts",
1109
+ "line": 99,
1110
+ "character": 1
1111
+ },
1112
+ "name": "typePredicateNoTypeFn",
1113
+ "signature": "function typePredicateNoTypeFn(condition: any, msg?: string): asserts condition",
1114
+ "modifiers": [
1115
+ "export"
1116
+ ],
1117
+ "params": [
1118
+ {
1119
+ "__schema": "ParameterSchema",
1120
+ "location": {
1121
+ "file": "index.ts",
1122
+ "line": 99,
1123
+ "character": 39
1124
+ },
1125
+ "name": "condition",
1126
+ "type": {
1127
+ "__schema": "KeywordTypeSchema",
1128
+ "location": {
1129
+ "file": "index.ts",
1130
+ "line": 99,
1131
+ "character": 50
1132
+ },
1133
+ "name": "any"
1134
+ }
1135
+ },
1136
+ {
1137
+ "__schema": "ParameterSchema",
1138
+ "location": {
1139
+ "file": "index.ts",
1140
+ "line": 99,
1141
+ "character": 55
1142
+ },
1143
+ "name": "msg",
1144
+ "type": {
1145
+ "__schema": "KeywordTypeSchema",
1146
+ "location": {
1147
+ "file": "index.ts",
1148
+ "line": 99,
1149
+ "character": 61
1150
+ },
1151
+ "name": "string"
1152
+ }
1153
+ }
1154
+ ],
1155
+ "returnType": {
1156
+ "__schema": "TypePredicateSchema",
1157
+ "location": {
1158
+ "file": "index.ts",
1159
+ "line": 99,
1160
+ "character": 70
1161
+ },
1162
+ "parameterName": "condition",
1163
+ "hasAssertsModifier": true
1164
+ }
1165
+ },
1166
+ {
1167
+ "__schema": "FunctionLikeSchema",
1168
+ "location": {
1169
+ "file": "index.ts",
1170
+ "line": 101,
1171
+ "character": 1
1172
+ },
1173
+ "name": "objectBindingElements",
1174
+ "signature": "function objectBindingElements({ prop }: {\n prop?: number;\n}): Promise<number>",
1175
+ "modifiers": [
1176
+ "export",
1177
+ "async"
1178
+ ],
1179
+ "params": [
1180
+ {
1181
+ "__schema": "ParameterSchema",
1182
+ "location": {
1183
+ "file": "index.ts",
1184
+ "line": 101,
1185
+ "character": 45
1186
+ },
1187
+ "name": "{ prop = 1 }",
1188
+ "type": {
1189
+ "__schema": "TypeLiteralSchema",
1190
+ "location": {
1191
+ "file": "index.ts",
1192
+ "line": 101,
1193
+ "character": 45
1194
+ },
1195
+ "members": [
1196
+ {
1197
+ "__schema": "InferenceTypeSchema",
1198
+ "location": {
1199
+ "file": "index.ts",
1200
+ "line": 101,
1201
+ "character": 45
1202
+ },
1203
+ "type": "number",
1204
+ "name": "prop"
1205
+ }
1206
+ ]
1207
+ }
1208
+ }
1209
+ ],
1210
+ "returnType": {
1211
+ "__schema": "InferenceTypeSchema",
1212
+ "location": {
1213
+ "file": "index.ts",
1214
+ "line": 101,
1215
+ "character": 1
1216
+ },
1217
+ "type": "Promise<number>"
1218
+ }
1219
+ },
1220
+ {
1221
+ "__schema": "FunctionLikeSchema",
1222
+ "location": {
1223
+ "file": "index.ts",
1224
+ "line": 104,
1225
+ "character": 1
1226
+ },
1227
+ "name": "arrayBindingElements",
1228
+ "signature": "function arrayBindingElements([prop]: [string]): Promise<string>",
1229
+ "modifiers": [
1230
+ "export",
1231
+ "async"
1232
+ ],
1233
+ "params": [
1234
+ {
1235
+ "__schema": "ParameterSchema",
1236
+ "location": {
1237
+ "file": "index.ts",
1238
+ "line": 104,
1239
+ "character": 44
1240
+ },
1241
+ "name": "[ prop ]",
1242
+ "type": {
1243
+ "__schema": "TupleTypeSchema",
1244
+ "location": {
1245
+ "file": "index.ts",
1246
+ "line": 104,
1247
+ "character": 52
1248
+ },
1249
+ "elements": [
1250
+ {
1251
+ "__schema": "KeywordTypeSchema",
1252
+ "location": {
1253
+ "file": "index.ts",
1254
+ "line": 104,
1255
+ "character": 53
1256
+ },
1257
+ "name": "string"
1258
+ }
1259
+ ]
1260
+ }
1261
+ }
1262
+ ],
1263
+ "returnType": {
1264
+ "__schema": "InferenceTypeSchema",
1265
+ "location": {
1266
+ "file": "index.ts",
1267
+ "line": 104,
1268
+ "character": 1
1269
+ },
1270
+ "type": "Promise<string>"
1271
+ }
1272
+ },
1273
+ {
1274
+ "__schema": "TypeSchema",
1275
+ "location": {
1276
+ "file": "index.ts",
1277
+ "line": 111,
1278
+ "character": 1
1279
+ },
1280
+ "name": "IndexedAccessType",
1281
+ "signature": "type IndexedAccessType = {\n a: string;\n b: boolean;\n}",
1282
+ "type": {
1283
+ "__schema": "IndexedAccessSchema",
1284
+ "location": {
1285
+ "file": "index.ts",
1286
+ "line": 111,
1287
+ "character": 33
1288
+ },
1289
+ "objectType": {
1290
+ "__schema": "InferenceTypeSchema",
1291
+ "location": {
1292
+ "file": "index.ts",
1293
+ "line": 111,
1294
+ "character": 33
1295
+ },
1296
+ "type": "interface config"
1297
+ },
1298
+ "indexType": {
1299
+ "__schema": "LiteralTypeSchema",
1300
+ "location": {
1301
+ "file": "index.ts",
1302
+ "line": 111,
1303
+ "character": 40
1304
+ },
1305
+ "name": "'someField'"
1306
+ }
1307
+ }
1308
+ }
1309
+ ]
1310
+ }
1311
+ }