expo-type-information 0.1.0 → 0.1.2

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.
@@ -40,12 +40,22 @@ export enum TestEnum {
40
40
  caseWithArgs1 = 'caseWithArgs1',
41
41
  caseWithArgs2 = 'caseWithArgs2'
42
42
  }
43
+ export enum IntBackedEnum1 {
44
+ simpleCase,
45
+ multipleCases1,
46
+ multipleCases2
47
+ }
48
+ export enum IntBackedEnum2 {
49
+ simpleCase
50
+ }
43
51
 
44
52
  export declare class TestClassWithConstructor {
45
53
  constructor(a: number);
46
54
  }
47
55
  export declare class TestBasicClass {
56
+ static TestStaticFunction(): string;
48
57
  TestAsyncFunction(a: number): Promise<string>;
58
+ static TestStaticAsyncFunction(a: string): Promise<void>;
49
59
  readonly TestIntProperty: number;
50
60
  readonly TestEitherProperty: number | string;
51
61
  readonly TestEnumProperty: TestEnum;
@@ -220,6 +230,8 @@ import { requireNativeModule, NativeModule } from 'expo';
220
230
 
221
231
  import {
222
232
  TestEnum,
233
+ IntBackedEnum1,
234
+ IntBackedEnum2,
223
235
  TestRecord,
224
236
  TestRecord2,
225
237
  TestRecordClass,
@@ -318,12 +330,22 @@ export enum TestEnum {
318
330
  caseWithArgs1 = 'caseWithArgs1',
319
331
  caseWithArgs2 = 'caseWithArgs2'
320
332
  }
333
+ export enum IntBackedEnum1 {
334
+ simpleCase,
335
+ multipleCases1,
336
+ multipleCases2
337
+ }
338
+ export enum IntBackedEnum2 {
339
+ simpleCase
340
+ }
321
341
 
322
342
  export declare class TestClassWithConstructor {
323
343
  constructor(a: number);
324
344
  }
325
345
  export declare class TestBasicClass {
346
+ static TestStaticFunction(): string;
326
347
  TestAsyncFunction(a: number): Promise<string>;
348
+ static TestStaticAsyncFunction(a: string): Promise<void>;
327
349
  readonly TestIntProperty: number;
328
350
  readonly TestEitherProperty: number | string;
329
351
  readonly TestEnumProperty: TestEnum;
@@ -414,6 +436,14 @@ export enum TestEnum {
414
436
  caseWithArgs1 = "caseWithArgs1",
415
437
  caseWithArgs2 = "caseWithArgs2"
416
438
  }
439
+ export enum IntBackedEnum1 {
440
+ simpleCase,
441
+ multipleCases1,
442
+ multipleCases2
443
+ }
444
+ export enum IntBackedEnum2 {
445
+ simpleCase
446
+ }
417
447
 
418
448
 
419
449
  export function SimpleFunction(a: number, b: number): number { return 0; }
@@ -445,7 +475,9 @@ export class TestClassWithConstructor {
445
475
  constructor(a: number) { }
446
476
  }
447
477
  export class TestBasicClass {
478
+ static TestStaticFunction(): string { return ""; }
448
479
  async TestAsyncFunction(a: number): Promise<string> { return ""; }
480
+ async static TestStaticAsyncFunction(a: string): Promise<void> { }
449
481
  constructor(a: number, b: string, c: string | TestRecord) { }
450
482
  }
451
483
  export class TestEmptyClass {
@@ -482,6 +514,16 @@ export var TestEnum;
482
514
  TestEnum["caseWithArgs1"] = "caseWithArgs1";
483
515
  TestEnum["caseWithArgs2"] = "caseWithArgs2";
484
516
  })(TestEnum || (TestEnum = {}));
517
+ export var IntBackedEnum1;
518
+ (function (IntBackedEnum1) {
519
+ IntBackedEnum1[IntBackedEnum1["simpleCase"] = 0] = "simpleCase";
520
+ IntBackedEnum1[IntBackedEnum1["multipleCases1"] = 1] = "multipleCases1";
521
+ IntBackedEnum1[IntBackedEnum1["multipleCases2"] = 2] = "multipleCases2";
522
+ })(IntBackedEnum1 || (IntBackedEnum1 = {}));
523
+ export var IntBackedEnum2;
524
+ (function (IntBackedEnum2) {
525
+ IntBackedEnum2[IntBackedEnum2["simpleCase"] = 0] = "simpleCase";
526
+ })(IntBackedEnum2 || (IntBackedEnum2 = {}));
485
527
  export function SimpleFunction(a, b) { return 0; }
486
528
  export function TestUntypedFunction() { return ""; }
487
529
  export function TestUnicodeCharacters() { return; }
@@ -499,7 +541,9 @@ export class TestClassWithConstructor {
499
541
  constructor(a) { }
500
542
  }
501
543
  export class TestBasicClass {
544
+ static TestStaticFunction() { return ""; }
502
545
  async TestAsyncFunction(a) { return ""; }
546
+ async static TestStaticAsyncFunction(a) { }
503
547
  constructor(a, b, c) { }
504
548
  }
505
549
  export class TestEmptyClass {
@@ -546,12 +590,22 @@ export enum TestEnum {
546
590
  caseWithArgs1 = 'caseWithArgs1',
547
591
  caseWithArgs2 = 'caseWithArgs2'
548
592
  }
593
+ export enum IntBackedEnum1 {
594
+ simpleCase,
595
+ multipleCases1,
596
+ multipleCases2
597
+ }
598
+ export enum IntBackedEnum2 {
599
+ simpleCase
600
+ }
549
601
 
550
602
  export declare class TestClassWithConstructor {
551
603
  constructor(a: number);
552
604
  }
553
605
  export declare class TestBasicClass {
606
+ static TestStaticFunction(): string;
554
607
  TestAsyncFunction(a: number): Promise<string>;
608
+ static TestStaticAsyncFunction(a: string): Promise<void>;
555
609
  readonly TestIntProperty: number;
556
610
  readonly TestEitherProperty: number | string;
557
611
  readonly TestEnumProperty: TestEnum;
@@ -642,6 +696,8 @@ export default _default;
642
696
  exports[`Same type information 1`] = `
643
697
  {
644
698
  "declaredTypeIdentifiersList": [
699
+ "IntBackedEnum1",
700
+ "IntBackedEnum2",
645
701
  "TestBasicClass",
646
702
  "TestClassWithConstructor",
647
703
  "TestEmptyClass",
@@ -660,6 +716,23 @@ exports[`Same type information 1`] = `
660
716
  "caseWithArgs2",
661
717
  ],
662
718
  "name": "TestEnum",
719
+ "stringBacked": true,
720
+ },
721
+ {
722
+ "cases": [
723
+ "simpleCase",
724
+ "multipleCases1",
725
+ "multipleCases2",
726
+ ],
727
+ "name": "IntBackedEnum1",
728
+ "stringBacked": false,
729
+ },
730
+ {
731
+ "cases": [
732
+ "simpleCase",
733
+ ],
734
+ "name": "IntBackedEnum2",
735
+ "stringBacked": false,
663
736
  },
664
737
  ],
665
738
  "inferredTypeParametersCountList": [
@@ -696,7 +769,8 @@ exports[`Same type information 1`] = `
696
769
  },
697
770
  },
698
771
  ],
699
- "definitionOffset": 2481,
772
+ "definitionOffset": 2637,
773
+ "isStatic": false,
700
774
  "name": "TestSimpleAsyncFunction",
701
775
  "parameters": [],
702
776
  "returnType": {
@@ -724,7 +798,8 @@ exports[`Same type information 1`] = `
724
798
  },
725
799
  },
726
800
  ],
727
- "definitionOffset": 2672,
801
+ "definitionOffset": 2840,
802
+ "isStatic": false,
728
803
  "name": "TestUnderscore",
729
804
  "parameters": [],
730
805
  "returnType": {
@@ -746,9 +821,9 @@ exports[`Same type information 1`] = `
746
821
  },
747
822
  },
748
823
  ],
749
- "definitionOffset": 2798,
824
+ "definitionOffset": 2966,
750
825
  },
751
- "definitionOffset": 2752,
826
+ "definitionOffset": 2920,
752
827
  "methods": [],
753
828
  "name": "TestClassWithConstructor",
754
829
  "properties": [],
@@ -765,7 +840,8 @@ exports[`Same type information 1`] = `
765
840
  },
766
841
  },
767
842
  ],
768
- "definitionOffset": 3340,
843
+ "definitionOffset": 3508,
844
+ "isStatic": false,
769
845
  "name": "TestAsyncFunction",
770
846
  "parameters": [],
771
847
  "returnType": {
@@ -773,6 +849,25 @@ exports[`Same type information 1`] = `
773
849
  "type": 1,
774
850
  },
775
851
  },
852
+ {
853
+ "arguments": [
854
+ {
855
+ "name": "a",
856
+ "type": {
857
+ "kind": 0,
858
+ "type": 1,
859
+ },
860
+ },
861
+ ],
862
+ "definitionOffset": 3606,
863
+ "isStatic": true,
864
+ "name": "TestStaticAsyncFunction",
865
+ "parameters": [],
866
+ "returnType": {
867
+ "kind": 0,
868
+ "type": 4,
869
+ },
870
+ },
776
871
  ],
777
872
  "constructor": {
778
873
  "arguments": [
@@ -810,14 +905,26 @@ exports[`Same type information 1`] = `
810
905
  },
811
906
  },
812
907
  ],
813
- "definitionOffset": 2900,
908
+ "definitionOffset": 3068,
814
909
  },
815
- "definitionOffset": 2864,
816
- "methods": [],
910
+ "definitionOffset": 3032,
911
+ "methods": [
912
+ {
913
+ "arguments": [],
914
+ "definitionOffset": 3693,
915
+ "isStatic": true,
916
+ "name": "TestStaticFunction",
917
+ "parameters": [],
918
+ "returnType": {
919
+ "kind": 0,
920
+ "type": 1,
921
+ },
922
+ },
923
+ ],
817
924
  "name": "TestBasicClass",
818
925
  "properties": [
819
926
  {
820
- "definitionOffset": 3004,
927
+ "definitionOffset": 3172,
821
928
  "name": "TestIntProperty",
822
929
  "type": {
823
930
  "kind": 0,
@@ -825,7 +932,7 @@ exports[`Same type information 1`] = `
825
932
  },
826
933
  },
827
934
  {
828
- "definitionOffset": 3072,
935
+ "definitionOffset": 3240,
829
936
  "name": "TestEitherProperty",
830
937
  "type": {
831
938
  "kind": 2,
@@ -845,7 +952,7 @@ exports[`Same type information 1`] = `
845
952
  },
846
953
  },
847
954
  {
848
- "definitionOffset": 3159,
955
+ "definitionOffset": 3327,
849
956
  "name": "TestEnumProperty",
850
957
  "type": {
851
958
  "kind": 1,
@@ -853,7 +960,7 @@ exports[`Same type information 1`] = `
853
960
  },
854
961
  },
855
962
  {
856
- "definitionOffset": 3243,
963
+ "definitionOffset": 3411,
857
964
  "name": "TestRecordProperty",
858
965
  "type": {
859
966
  "kind": 1,
@@ -865,7 +972,7 @@ exports[`Same type information 1`] = `
865
972
  {
866
973
  "asyncMethods": [],
867
974
  "constructor": null,
868
- "definitionOffset": 3442,
975
+ "definitionOffset": 3791,
869
976
  "methods": [],
870
977
  "name": "TestEmptyClass",
871
978
  "properties": [],
@@ -881,7 +988,7 @@ exports[`Same type information 1`] = `
881
988
  },
882
989
  },
883
990
  {
884
- "definitionOffset": 326,
991
+ "definitionOffset": 338,
885
992
  "name": "IntConstant",
886
993
  "type": {
887
994
  "kind": 0,
@@ -889,7 +996,7 @@ exports[`Same type information 1`] = `
889
996
  },
890
997
  },
891
998
  {
892
- "definitionOffset": 464,
999
+ "definitionOffset": 488,
893
1000
  "name": "UntypedConstant",
894
1001
  "type": {
895
1002
  "kind": 0,
@@ -922,7 +1029,8 @@ exports[`Same type information 1`] = `
922
1029
  },
923
1030
  },
924
1031
  ],
925
- "definitionOffset": 510,
1032
+ "definitionOffset": 534,
1033
+ "isStatic": false,
926
1034
  "name": "SimpleFunction",
927
1035
  "parameters": [],
928
1036
  "returnType": {
@@ -932,7 +1040,8 @@ exports[`Same type information 1`] = `
932
1040
  },
933
1041
  {
934
1042
  "arguments": [],
935
- "definitionOffset": 674,
1043
+ "definitionOffset": 710,
1044
+ "isStatic": false,
936
1045
  "name": "TestUntypedFunction",
937
1046
  "parameters": [],
938
1047
  "returnType": {
@@ -942,7 +1051,8 @@ exports[`Same type information 1`] = `
942
1051
  },
943
1052
  {
944
1053
  "arguments": [],
945
- "definitionOffset": 818,
1054
+ "definitionOffset": 866,
1055
+ "isStatic": false,
946
1056
  "name": "TestUnicodeCharacters",
947
1057
  "parameters": [],
948
1058
  "returnType": {
@@ -952,7 +1062,8 @@ exports[`Same type information 1`] = `
952
1062
  },
953
1063
  {
954
1064
  "arguments": [],
955
- "definitionOffset": 1008,
1065
+ "definitionOffset": 1068,
1066
+ "isStatic": false,
956
1067
  "name": "TestUntypedFunction2",
957
1068
  "parameters": [],
958
1069
  "returnType": {
@@ -962,7 +1073,8 @@ exports[`Same type information 1`] = `
962
1073
  },
963
1074
  {
964
1075
  "arguments": [],
965
- "definitionOffset": 1172,
1076
+ "definitionOffset": 1244,
1077
+ "isStatic": false,
966
1078
  "name": "TestUntypedFunction3",
967
1079
  "parameters": [],
968
1080
  "returnType": {
@@ -983,7 +1095,8 @@ exports[`Same type information 1`] = `
983
1095
  },
984
1096
  },
985
1097
  ],
986
- "definitionOffset": 1338,
1098
+ "definitionOffset": 1422,
1099
+ "isStatic": false,
987
1100
  "name": "TestArrays",
988
1101
  "parameters": [],
989
1102
  "returnType": {
@@ -1041,7 +1154,8 @@ exports[`Same type information 1`] = `
1041
1154
  },
1042
1155
  },
1043
1156
  ],
1044
- "definitionOffset": 1497,
1157
+ "definitionOffset": 1593,
1158
+ "isStatic": false,
1045
1159
  "name": "TestDictionaries",
1046
1160
  "parameters": [],
1047
1161
  "returnType": {
@@ -1131,7 +1245,8 @@ exports[`Same type information 1`] = `
1131
1245
  },
1132
1246
  },
1133
1247
  ],
1134
- "definitionOffset": 1694,
1248
+ "definitionOffset": 1802,
1249
+ "isStatic": false,
1135
1250
  "name": "TestParametrizedTypes",
1136
1251
  "parameters": [],
1137
1252
  "returnType": {
@@ -1158,7 +1273,8 @@ exports[`Same type information 1`] = `
1158
1273
  },
1159
1274
  },
1160
1275
  ],
1161
- "definitionOffset": 1938,
1276
+ "definitionOffset": 2058,
1277
+ "isStatic": false,
1162
1278
  "name": "TestTypeCombinations",
1163
1279
  "parameters": [],
1164
1280
  "returnType": {
@@ -1195,7 +1311,8 @@ exports[`Same type information 1`] = `
1195
1311
  },
1196
1312
  {
1197
1313
  "arguments": [],
1198
- "definitionOffset": 2139,
1314
+ "definitionOffset": 2271,
1315
+ "isStatic": false,
1199
1316
  "name": "TestFunctionReturningRecord",
1200
1317
  "parameters": [],
1201
1318
  "returnType": {
@@ -1205,7 +1322,8 @@ exports[`Same type information 1`] = `
1205
1322
  },
1206
1323
  {
1207
1324
  "arguments": [],
1208
- "definitionOffset": 2304,
1325
+ "definitionOffset": 2448,
1326
+ "isStatic": false,
1209
1327
  "name": "TestFunctionReturningEnum",
1210
1328
  "parameters": [],
1211
1329
  "returnType": {
@@ -1223,7 +1341,7 @@ exports[`Same type information 1`] = `
1223
1341
  "classes": [],
1224
1342
  "constants": [],
1225
1343
  "constructor": null,
1226
- "definitionOffset": 3505,
1344
+ "definitionOffset": 3854,
1227
1345
  "events": [
1228
1346
  "onEvent1",
1229
1347
  "onEvent2",
@@ -1249,7 +1367,7 @@ exports[`Same type information 1`] = `
1249
1367
  },
1250
1368
  },
1251
1369
  ],
1252
- "definitionOffset": 3551,
1370
+ "definitionOffset": 3900,
1253
1371
  "name": "url",
1254
1372
  },
1255
1373
  {
@@ -1269,7 +1387,7 @@ exports[`Same type information 1`] = `
1269
1387
  },
1270
1388
  },
1271
1389
  ],
1272
- "definitionOffset": 3735,
1390
+ "definitionOffset": 4084,
1273
1391
  "name": "testRecord",
1274
1392
  },
1275
1393
  {
@@ -1289,7 +1407,7 @@ exports[`Same type information 1`] = `
1289
1407
  },
1290
1408
  },
1291
1409
  ],
1292
- "definitionOffset": 3806,
1410
+ "definitionOffset": 4155,
1293
1411
  "name": "testRecord2",
1294
1412
  },
1295
1413
  {
@@ -1309,7 +1427,7 @@ exports[`Same type information 1`] = `
1309
1427
  },
1310
1428
  },
1311
1429
  ],
1312
- "definitionOffset": 3880,
1430
+ "definitionOffset": 4229,
1313
1431
  "name": "testRecordClass",
1314
1432
  },
1315
1433
  {
@@ -1329,7 +1447,7 @@ exports[`Same type information 1`] = `
1329
1447
  },
1330
1448
  },
1331
1449
  ],
1332
- "definitionOffset": 3966,
1450
+ "definitionOffset": 4315,
1333
1451
  "name": "testEnum",
1334
1452
  },
1335
1453
  ],
@@ -1457,6 +1575,34 @@ exports[`Same type information 1`] = `
1457
1575
  },
1458
1576
  ],
1459
1577
  "typeIdentifierDefinitionList": [
1578
+ [
1579
+ "IntBackedEnum1",
1580
+ {
1581
+ "definition": {
1582
+ "cases": [
1583
+ "simpleCase",
1584
+ "multipleCases1",
1585
+ "multipleCases2",
1586
+ ],
1587
+ "name": "IntBackedEnum1",
1588
+ "stringBacked": false,
1589
+ },
1590
+ "kind": 1,
1591
+ },
1592
+ ],
1593
+ [
1594
+ "IntBackedEnum2",
1595
+ {
1596
+ "definition": {
1597
+ "cases": [
1598
+ "simpleCase",
1599
+ ],
1600
+ "name": "IntBackedEnum2",
1601
+ "stringBacked": false,
1602
+ },
1603
+ "kind": 1,
1604
+ },
1605
+ ],
1460
1606
  [
1461
1607
  "TestEnum",
1462
1608
  {
@@ -1469,6 +1615,7 @@ exports[`Same type information 1`] = `
1469
1615
  "caseWithArgs2",
1470
1616
  ],
1471
1617
  "name": "TestEnum",
1618
+ "stringBacked": true,
1472
1619
  },
1473
1620
  "kind": 1,
1474
1621
  },