@react-native/codegen 0.74.0-nightly-20231204-e9b80971c → 0.74.0-nightly-20231206-eb661df2a

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 (35) hide show
  1. package/lib/generators/components/GenerateComponentDescriptorH.js +2 -4
  2. package/lib/generators/components/GenerateComponentDescriptorH.js.flow +2 -4
  3. package/lib/generators/components/GenerateEventEmitterCpp.js +2 -4
  4. package/lib/generators/components/GenerateEventEmitterCpp.js.flow +2 -4
  5. package/lib/generators/components/GenerateEventEmitterH.js +2 -4
  6. package/lib/generators/components/GenerateEventEmitterH.js.flow +2 -4
  7. package/lib/generators/components/GeneratePropsCpp.js +2 -4
  8. package/lib/generators/components/GeneratePropsCpp.js.flow +2 -4
  9. package/lib/generators/components/GeneratePropsH.js +2 -4
  10. package/lib/generators/components/GeneratePropsH.js.flow +2 -4
  11. package/lib/generators/components/GenerateShadowNodeCpp.js +2 -4
  12. package/lib/generators/components/GenerateShadowNodeCpp.js.flow +2 -4
  13. package/lib/generators/components/GenerateShadowNodeH.js +2 -4
  14. package/lib/generators/components/GenerateShadowNodeH.js.flow +2 -4
  15. package/lib/generators/components/GenerateStateCpp.js +2 -4
  16. package/lib/generators/components/GenerateStateCpp.js.flow +2 -4
  17. package/lib/generators/components/GenerateStateH.js +2 -4
  18. package/lib/generators/components/GenerateStateH.js.flow +2 -4
  19. package/lib/generators/modules/GenerateModuleCpp.js +2 -4
  20. package/lib/generators/modules/GenerateModuleCpp.js.flow +2 -4
  21. package/lib/generators/modules/GenerateModuleH.js +2 -4
  22. package/lib/generators/modules/GenerateModuleH.js.flow +2 -4
  23. package/lib/generators/modules/GenerateModuleJniCpp.js +2 -4
  24. package/lib/generators/modules/GenerateModuleJniCpp.js.flow +2 -4
  25. package/lib/generators/modules/GenerateModuleJniH.js +2 -4
  26. package/lib/generators/modules/GenerateModuleJniH.js.flow +2 -4
  27. package/lib/generators/modules/GenerateModuleObjCpp/index.js +9 -11
  28. package/lib/generators/modules/GenerateModuleObjCpp/index.js.flow +9 -11
  29. package/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js +25 -27
  30. package/lib/generators/modules/GenerateModuleObjCpp/source/serializeModule.js.flow +25 -27
  31. package/lib/generators/modules/__test_fixtures__/fixtures.js +685 -64
  32. package/lib/generators/modules/__test_fixtures__/fixtures.js.flow +686 -64
  33. package/lib/parsers/parsers-commons.js +1 -1
  34. package/lib/parsers/parsers-commons.js.flow +1 -1
  35. package/package.json +1 -1
@@ -1569,7 +1569,117 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = {
1569
1569
  NativeSampleTurboModule: {
1570
1570
  type: 'NativeModule',
1571
1571
  aliasMap: {
1572
- ObjectAlias: {
1572
+ ConstantsStruct: {
1573
+ type: 'ObjectTypeAnnotation',
1574
+ properties: [
1575
+ {
1576
+ name: 'const1',
1577
+ optional: false,
1578
+ typeAnnotation: {
1579
+ type: 'BooleanTypeAnnotation',
1580
+ },
1581
+ },
1582
+ {
1583
+ name: 'const2',
1584
+ optional: false,
1585
+ typeAnnotation: {
1586
+ type: 'NumberTypeAnnotation',
1587
+ },
1588
+ },
1589
+ {
1590
+ name: 'const3',
1591
+ optional: false,
1592
+ typeAnnotation: {
1593
+ type: 'StringTypeAnnotation',
1594
+ },
1595
+ },
1596
+ ],
1597
+ },
1598
+ CustomHostObject: {
1599
+ type: 'ObjectTypeAnnotation',
1600
+ properties: [],
1601
+ },
1602
+ BinaryTreeNode: {
1603
+ type: 'ObjectTypeAnnotation',
1604
+ properties: [
1605
+ {
1606
+ name: 'left',
1607
+ optional: true,
1608
+ typeAnnotation: {
1609
+ type: 'TypeAliasTypeAnnotation',
1610
+ name: 'BinaryTreeNode',
1611
+ },
1612
+ },
1613
+ {
1614
+ name: 'value',
1615
+ optional: false,
1616
+ typeAnnotation: {
1617
+ type: 'NumberTypeAnnotation',
1618
+ },
1619
+ },
1620
+ {
1621
+ name: 'right',
1622
+ optional: true,
1623
+ typeAnnotation: {
1624
+ type: 'TypeAliasTypeAnnotation',
1625
+ name: 'BinaryTreeNode',
1626
+ },
1627
+ },
1628
+ ],
1629
+ },
1630
+ GraphNode: {
1631
+ type: 'ObjectTypeAnnotation',
1632
+ properties: [
1633
+ {
1634
+ name: 'label',
1635
+ optional: false,
1636
+ typeAnnotation: {
1637
+ type: 'StringTypeAnnotation',
1638
+ },
1639
+ },
1640
+ {
1641
+ name: 'neighbors',
1642
+ optional: true,
1643
+ typeAnnotation: {
1644
+ type: 'ArrayTypeAnnotation',
1645
+ elementType: {
1646
+ type: 'TypeAliasTypeAnnotation',
1647
+ name: 'GraphNode',
1648
+ },
1649
+ },
1650
+ },
1651
+ ],
1652
+ },
1653
+ ObjectStruct: {
1654
+ type: 'ObjectTypeAnnotation',
1655
+ properties: [
1656
+ {
1657
+ name: 'a',
1658
+ optional: false,
1659
+ typeAnnotation: {
1660
+ type: 'NumberTypeAnnotation',
1661
+ },
1662
+ },
1663
+ {
1664
+ name: 'b',
1665
+ optional: false,
1666
+ typeAnnotation: {
1667
+ type: 'StringTypeAnnotation',
1668
+ },
1669
+ },
1670
+ {
1671
+ name: 'c',
1672
+ optional: true,
1673
+ typeAnnotation: {
1674
+ type: 'NullableTypeAnnotation',
1675
+ typeAnnotation: {
1676
+ type: 'StringTypeAnnotation',
1677
+ },
1678
+ },
1679
+ },
1680
+ ],
1681
+ },
1682
+ ValueStruct: {
1573
1683
  type: 'ObjectTypeAnnotation',
1574
1684
  properties: [
1575
1685
  {
@@ -1579,56 +1689,141 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = {
1579
1689
  type: 'NumberTypeAnnotation',
1580
1690
  },
1581
1691
  },
1692
+ {
1693
+ name: 'y',
1694
+ optional: false,
1695
+ typeAnnotation: {
1696
+ type: 'StringTypeAnnotation',
1697
+ },
1698
+ },
1699
+ {
1700
+ name: 'z',
1701
+ optional: false,
1702
+ typeAnnotation: {
1703
+ type: 'TypeAliasTypeAnnotation',
1704
+ name: 'ObjectStruct',
1705
+ },
1706
+ },
1707
+ ],
1708
+ },
1709
+ MenuItem: {
1710
+ type: 'ObjectTypeAnnotation',
1711
+ properties: [
1712
+ {
1713
+ name: 'label',
1714
+ optional: false,
1715
+ typeAnnotation: {
1716
+ type: 'StringTypeAnnotation',
1717
+ },
1718
+ },
1719
+ {
1720
+ name: 'onPress',
1721
+ optional: false,
1722
+ typeAnnotation: {
1723
+ type: 'FunctionTypeAnnotation',
1724
+ returnTypeAnnotation: {
1725
+ type: 'VoidTypeAnnotation',
1726
+ },
1727
+ params: [
1728
+ {
1729
+ name: 'value',
1730
+ optional: false,
1731
+ typeAnnotation: {
1732
+ type: 'StringTypeAnnotation',
1733
+ },
1734
+ },
1735
+ {
1736
+ name: 'flag',
1737
+ optional: false,
1738
+ typeAnnotation: {
1739
+ type: 'BooleanTypeAnnotation',
1740
+ },
1741
+ },
1742
+ ],
1743
+ },
1744
+ },
1745
+ {
1746
+ name: 'shortcut',
1747
+ optional: true,
1748
+ typeAnnotation: {
1749
+ type: 'NullableTypeAnnotation',
1750
+ typeAnnotation: {
1751
+ type: 'StringTypeAnnotation',
1752
+ },
1753
+ },
1754
+ },
1755
+ {
1756
+ name: 'items',
1757
+ optional: true,
1758
+ typeAnnotation: {
1759
+ type: 'ArrayTypeAnnotation',
1760
+ elementType: {
1761
+ type: 'TypeAliasTypeAnnotation',
1762
+ name: 'MenuItem',
1763
+ },
1764
+ },
1765
+ },
1582
1766
  ],
1583
1767
  },
1584
1768
  },
1585
1769
  enumMap: {
1586
- NumEnum: {
1770
+ EnumInt: {
1771
+ name: 'EnumInt',
1587
1772
  type: 'EnumDeclarationWithMembers',
1588
- name: 'NumEnum',
1589
1773
  memberType: 'NumberTypeAnnotation',
1590
1774
  members: [
1591
1775
  {
1592
- name: 'ONE',
1593
- value: '1',
1776
+ name: 'IA',
1777
+ value: '23',
1594
1778
  },
1595
1779
  {
1596
- name: 'TWO',
1597
- value: '2',
1780
+ name: 'IB',
1781
+ value: '42',
1598
1782
  },
1599
1783
  ],
1600
1784
  },
1601
- FloatEnum: {
1785
+ EnumFloat: {
1786
+ name: 'EnumFloat',
1602
1787
  type: 'EnumDeclarationWithMembers',
1603
- name: 'FloatEnum',
1604
1788
  memberType: 'NumberTypeAnnotation',
1605
1789
  members: [
1606
1790
  {
1607
- name: 'POINT_ZERO',
1608
- value: '0.0',
1791
+ name: 'FA',
1792
+ value: '1.23',
1609
1793
  },
1610
1794
  {
1611
- name: 'POINT_ONE',
1612
- value: '0.1',
1795
+ name: 'FB',
1796
+ value: '4.56',
1613
1797
  },
1798
+ ],
1799
+ },
1800
+ EnumNone: {
1801
+ name: 'EnumNone',
1802
+ type: 'EnumDeclarationWithMembers',
1803
+ memberType: 'StringTypeAnnotation',
1804
+ members: [
1614
1805
  {
1615
- name: 'POINT_TWO',
1616
- value: '0.2',
1806
+ name: 'NA',
1807
+ value: 'NA',
1808
+ },
1809
+ {
1810
+ name: 'NB',
1811
+ value: 'NB',
1617
1812
  },
1618
1813
  ],
1619
1814
  },
1620
- StringEnum: {
1815
+ EnumStr: {
1816
+ name: 'EnumStr',
1621
1817
  type: 'EnumDeclarationWithMembers',
1622
- name: 'StringEnum',
1623
1818
  memberType: 'StringTypeAnnotation',
1624
1819
  members: [
1625
1820
  {
1626
- name: 'HELLO',
1627
- value: 'hello',
1821
+ name: 'SA',
1822
+ value: 's---a',
1628
1823
  },
1629
1824
  {
1630
- name: 'GoodBye',
1631
- value: 'goodbye',
1825
+ name: 'SB',
1826
+ value: 's---b',
1632
1827
  },
1633
1828
  ],
1634
1829
  },
@@ -1636,147 +1831,574 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = {
1636
1831
  spec: {
1637
1832
  properties: [
1638
1833
  {
1639
- name: 'getMixed',
1834
+ name: 'getArray',
1640
1835
  optional: false,
1641
1836
  typeAnnotation: {
1642
1837
  type: 'FunctionTypeAnnotation',
1643
1838
  returnTypeAnnotation: {
1644
- type: 'MixedTypeAnnotation',
1839
+ type: 'ArrayTypeAnnotation',
1645
1840
  },
1646
1841
  params: [
1647
1842
  {
1648
1843
  name: 'arg',
1649
1844
  optional: false,
1650
1845
  typeAnnotation: {
1651
- type: 'MixedTypeAnnotation',
1846
+ type: 'ArrayTypeAnnotation',
1652
1847
  },
1653
1848
  },
1654
1849
  ],
1655
1850
  },
1656
1851
  },
1657
1852
  {
1658
- name: 'getNullableNumberFromNullableAlias',
1853
+ name: 'getBool',
1659
1854
  optional: false,
1660
1855
  typeAnnotation: {
1661
1856
  type: 'FunctionTypeAnnotation',
1662
1857
  returnTypeAnnotation: {
1663
- type: 'NullableTypeAnnotation',
1664
- typeAnnotation: {
1665
- type: 'NumberTypeAnnotation',
1666
- },
1858
+ type: 'BooleanTypeAnnotation',
1667
1859
  },
1668
1860
  params: [
1669
1861
  {
1670
- name: 'a',
1862
+ name: 'arg',
1671
1863
  optional: false,
1672
1864
  typeAnnotation: {
1673
- type: 'NullableTypeAnnotation',
1674
- typeAnnotation: {
1675
- type: 'TypeAliasTypeAnnotation',
1676
- name: 'ObjectAlias',
1677
- },
1865
+ type: 'BooleanTypeAnnotation',
1678
1866
  },
1679
1867
  },
1680
1868
  ],
1681
1869
  },
1682
1870
  },
1683
1871
  {
1684
- name: 'getEnums',
1872
+ name: 'getConstants',
1685
1873
  optional: false,
1686
1874
  typeAnnotation: {
1687
1875
  type: 'FunctionTypeAnnotation',
1688
1876
  returnTypeAnnotation: {
1689
- type: 'StringTypeAnnotation',
1877
+ type: 'TypeAliasTypeAnnotation',
1878
+ name: 'ConstantsStruct',
1879
+ },
1880
+ params: [],
1881
+ },
1882
+ },
1883
+ {
1884
+ name: 'getCustomEnum',
1885
+ optional: false,
1886
+ typeAnnotation: {
1887
+ type: 'FunctionTypeAnnotation',
1888
+ returnTypeAnnotation: {
1889
+ name: 'EnumInt',
1890
+ type: 'EnumDeclaration',
1891
+ memberType: 'NumberTypeAnnotation',
1690
1892
  },
1691
1893
  params: [
1692
1894
  {
1693
- name: 'enumInt',
1895
+ name: 'arg',
1694
1896
  optional: false,
1695
1897
  typeAnnotation: {
1696
- name: 'NumEnum',
1898
+ name: 'EnumInt',
1697
1899
  type: 'EnumDeclaration',
1698
1900
  memberType: 'NumberTypeAnnotation',
1699
1901
  },
1700
1902
  },
1903
+ ],
1904
+ },
1905
+ },
1906
+ {
1907
+ name: 'getCustomHostObject',
1908
+ optional: false,
1909
+ typeAnnotation: {
1910
+ type: 'FunctionTypeAnnotation',
1911
+ returnTypeAnnotation: {
1912
+ type: 'TypeAliasTypeAnnotation',
1913
+ name: 'CustomHostObject',
1914
+ },
1915
+ params: [],
1916
+ },
1917
+ },
1918
+ {
1919
+ name: 'consumeCustomHostObject',
1920
+ optional: false,
1921
+ typeAnnotation: {
1922
+ type: 'FunctionTypeAnnotation',
1923
+ returnTypeAnnotation: {
1924
+ type: 'StringTypeAnnotation',
1925
+ },
1926
+ params: [
1701
1927
  {
1702
- name: 'enumFloat',
1928
+ name: 'customHostObject',
1703
1929
  optional: false,
1704
1930
  typeAnnotation: {
1705
- name: 'FloatEnum',
1706
- type: 'EnumDeclaration',
1707
- memberType: 'NumberTypeAnnotation',
1931
+ type: 'TypeAliasTypeAnnotation',
1932
+ name: 'CustomHostObject',
1708
1933
  },
1709
1934
  },
1935
+ ],
1936
+ },
1937
+ },
1938
+ {
1939
+ name: 'getBinaryTreeNode',
1940
+ optional: false,
1941
+ typeAnnotation: {
1942
+ type: 'FunctionTypeAnnotation',
1943
+ returnTypeAnnotation: {
1944
+ type: 'TypeAliasTypeAnnotation',
1945
+ name: 'BinaryTreeNode',
1946
+ },
1947
+ params: [
1710
1948
  {
1711
- name: 'enumString',
1949
+ name: 'arg',
1712
1950
  optional: false,
1713
1951
  typeAnnotation: {
1714
- name: 'StringEnum',
1715
- type: 'EnumDeclaration',
1716
- memberType: 'StringTypeAnnotation',
1952
+ type: 'TypeAliasTypeAnnotation',
1953
+ name: 'BinaryTreeNode',
1717
1954
  },
1718
1955
  },
1719
1956
  ],
1720
1957
  },
1721
1958
  },
1722
1959
  {
1723
- name: 'getUnion',
1960
+ name: 'getGraphNode',
1724
1961
  optional: false,
1725
1962
  typeAnnotation: {
1726
1963
  type: 'FunctionTypeAnnotation',
1727
1964
  returnTypeAnnotation: {
1728
- type: 'UnionTypeAnnotation',
1729
- memberType: 'ObjectTypeAnnotation',
1965
+ type: 'TypeAliasTypeAnnotation',
1966
+ name: 'GraphNode',
1730
1967
  },
1731
1968
  params: [
1732
1969
  {
1733
- name: 'chooseInt',
1970
+ name: 'arg',
1734
1971
  optional: false,
1735
1972
  typeAnnotation: {
1736
- type: 'UnionTypeAnnotation',
1737
- memberType: 'NumberTypeAnnotation',
1973
+ type: 'TypeAliasTypeAnnotation',
1974
+ name: 'GraphNode',
1738
1975
  },
1739
1976
  },
1740
- {
1741
- name: 'chooseFloat',
1742
- optional: false,
1977
+ ],
1978
+ },
1979
+ },
1980
+ {
1981
+ name: 'getNumEnum',
1982
+ optional: false,
1983
+ typeAnnotation: {
1984
+ type: 'FunctionTypeAnnotation',
1985
+ returnTypeAnnotation: {
1986
+ name: 'EnumFloat',
1987
+ type: 'EnumDeclaration',
1988
+ memberType: 'NumberTypeAnnotation',
1989
+ },
1990
+ params: [
1991
+ {
1992
+ name: 'arg',
1993
+ optional: false,
1743
1994
  typeAnnotation: {
1744
- type: 'UnionTypeAnnotation',
1995
+ name: 'EnumInt',
1996
+ type: 'EnumDeclaration',
1745
1997
  memberType: 'NumberTypeAnnotation',
1746
1998
  },
1747
1999
  },
2000
+ ],
2001
+ },
2002
+ },
2003
+ {
2004
+ name: 'getStrEnum',
2005
+ optional: false,
2006
+ typeAnnotation: {
2007
+ type: 'FunctionTypeAnnotation',
2008
+ returnTypeAnnotation: {
2009
+ name: 'EnumStr',
2010
+ type: 'EnumDeclaration',
2011
+ memberType: 'StringTypeAnnotation',
2012
+ },
2013
+ params: [
1748
2014
  {
1749
- name: 'chooseObject',
2015
+ name: 'arg',
2016
+ optional: false,
2017
+ typeAnnotation: {
2018
+ name: 'EnumNone',
2019
+ type: 'EnumDeclaration',
2020
+ memberType: 'StringTypeAnnotation',
2021
+ },
2022
+ },
2023
+ ],
2024
+ },
2025
+ },
2026
+ {
2027
+ name: 'getMap',
2028
+ optional: false,
2029
+ typeAnnotation: {
2030
+ type: 'FunctionTypeAnnotation',
2031
+ returnTypeAnnotation: {
2032
+ type: 'GenericObjectTypeAnnotation',
2033
+ dictionaryValueType: {
2034
+ type: 'NullableTypeAnnotation',
2035
+ typeAnnotation: {
2036
+ type: 'NumberTypeAnnotation',
2037
+ },
2038
+ },
2039
+ },
2040
+ params: [
2041
+ {
2042
+ name: 'arg',
2043
+ optional: false,
2044
+ typeAnnotation: {
2045
+ type: 'GenericObjectTypeAnnotation',
2046
+ dictionaryValueType: {
2047
+ type: 'NullableTypeAnnotation',
2048
+ typeAnnotation: {
2049
+ type: 'NumberTypeAnnotation',
2050
+ },
2051
+ },
2052
+ },
2053
+ },
2054
+ ],
2055
+ },
2056
+ },
2057
+ {
2058
+ name: 'getNumber',
2059
+ optional: false,
2060
+ typeAnnotation: {
2061
+ type: 'FunctionTypeAnnotation',
2062
+ returnTypeAnnotation: {
2063
+ type: 'NumberTypeAnnotation',
2064
+ },
2065
+ params: [
2066
+ {
2067
+ name: 'arg',
2068
+ optional: false,
2069
+ typeAnnotation: {
2070
+ type: 'NumberTypeAnnotation',
2071
+ },
2072
+ },
2073
+ ],
2074
+ },
2075
+ },
2076
+ {
2077
+ name: 'getObject',
2078
+ optional: false,
2079
+ typeAnnotation: {
2080
+ type: 'FunctionTypeAnnotation',
2081
+ returnTypeAnnotation: {
2082
+ type: 'TypeAliasTypeAnnotation',
2083
+ name: 'ObjectStruct',
2084
+ },
2085
+ params: [
2086
+ {
2087
+ name: 'arg',
2088
+ optional: false,
2089
+ typeAnnotation: {
2090
+ type: 'TypeAliasTypeAnnotation',
2091
+ name: 'ObjectStruct',
2092
+ },
2093
+ },
2094
+ ],
2095
+ },
2096
+ },
2097
+ {
2098
+ name: 'getSet',
2099
+ optional: false,
2100
+ typeAnnotation: {
2101
+ type: 'FunctionTypeAnnotation',
2102
+ returnTypeAnnotation: {
2103
+ type: 'ArrayTypeAnnotation',
2104
+ elementType: {
2105
+ type: 'NumberTypeAnnotation',
2106
+ },
2107
+ },
2108
+ params: [
2109
+ {
2110
+ name: 'arg',
2111
+ optional: false,
2112
+ typeAnnotation: {
2113
+ type: 'ArrayTypeAnnotation',
2114
+ elementType: {
2115
+ type: 'NumberTypeAnnotation',
2116
+ },
2117
+ },
2118
+ },
2119
+ ],
2120
+ },
2121
+ },
2122
+ {
2123
+ name: 'getString',
2124
+ optional: false,
2125
+ typeAnnotation: {
2126
+ type: 'FunctionTypeAnnotation',
2127
+ returnTypeAnnotation: {
2128
+ type: 'StringTypeAnnotation',
2129
+ },
2130
+ params: [
2131
+ {
2132
+ name: 'arg',
2133
+ optional: false,
2134
+ typeAnnotation: {
2135
+ type: 'StringTypeAnnotation',
2136
+ },
2137
+ },
2138
+ ],
2139
+ },
2140
+ },
2141
+ {
2142
+ name: 'getUnion',
2143
+ optional: false,
2144
+ typeAnnotation: {
2145
+ type: 'FunctionTypeAnnotation',
2146
+ returnTypeAnnotation: {
2147
+ type: 'StringTypeAnnotation',
2148
+ },
2149
+ params: [
2150
+ {
2151
+ name: 'x',
1750
2152
  optional: false,
1751
2153
  typeAnnotation: {
1752
2154
  type: 'UnionTypeAnnotation',
1753
- memberType: 'ObjectTypeAnnotation',
2155
+ memberType: 'NumberTypeAnnotation',
1754
2156
  },
1755
2157
  },
1756
2158
  {
1757
- name: 'chooseString',
2159
+ name: 'y',
1758
2160
  optional: false,
1759
2161
  typeAnnotation: {
1760
2162
  type: 'UnionTypeAnnotation',
1761
2163
  memberType: 'StringTypeAnnotation',
1762
2164
  },
1763
2165
  },
2166
+ {
2167
+ name: 'z',
2168
+ optional: false,
2169
+ typeAnnotation: {
2170
+ type: 'UnionTypeAnnotation',
2171
+ memberType: 'ObjectTypeAnnotation',
2172
+ },
2173
+ },
1764
2174
  ],
1765
2175
  },
1766
2176
  },
1767
2177
  {
1768
- name: 'getEnumReturn',
2178
+ name: 'getValue',
1769
2179
  optional: false,
1770
2180
  typeAnnotation: {
1771
2181
  type: 'FunctionTypeAnnotation',
1772
2182
  returnTypeAnnotation: {
1773
- type: 'EnumDeclaration',
1774
- name: 'NumEnum',
1775
- memberType: 'NumberTypeAnnotation',
2183
+ type: 'TypeAliasTypeAnnotation',
2184
+ name: 'ValueStruct',
2185
+ },
2186
+ params: [
2187
+ {
2188
+ name: 'x',
2189
+ optional: false,
2190
+ typeAnnotation: {
2191
+ type: 'NumberTypeAnnotation',
2192
+ },
2193
+ },
2194
+ {
2195
+ name: 'y',
2196
+ optional: false,
2197
+ typeAnnotation: {
2198
+ type: 'StringTypeAnnotation',
2199
+ },
2200
+ },
2201
+ {
2202
+ name: 'z',
2203
+ optional: false,
2204
+ typeAnnotation: {
2205
+ type: 'TypeAliasTypeAnnotation',
2206
+ name: 'ObjectStruct',
2207
+ },
2208
+ },
2209
+ ],
2210
+ },
2211
+ },
2212
+ {
2213
+ name: 'getValueWithCallback',
2214
+ optional: false,
2215
+ typeAnnotation: {
2216
+ type: 'FunctionTypeAnnotation',
2217
+ returnTypeAnnotation: {
2218
+ type: 'VoidTypeAnnotation',
2219
+ },
2220
+ params: [
2221
+ {
2222
+ name: 'callback',
2223
+ optional: false,
2224
+ typeAnnotation: {
2225
+ type: 'FunctionTypeAnnotation',
2226
+ returnTypeAnnotation: {
2227
+ type: 'VoidTypeAnnotation',
2228
+ },
2229
+ params: [
2230
+ {
2231
+ name: 'value',
2232
+ optional: false,
2233
+ typeAnnotation: {
2234
+ type: 'StringTypeAnnotation',
2235
+ },
2236
+ },
2237
+ ],
2238
+ },
2239
+ },
2240
+ ],
2241
+ },
2242
+ },
2243
+ {
2244
+ name: 'getValueWithPromise',
2245
+ optional: false,
2246
+ typeAnnotation: {
2247
+ type: 'FunctionTypeAnnotation',
2248
+ returnTypeAnnotation: {
2249
+ type: 'PromiseTypeAnnotation',
2250
+ elementType: {
2251
+ type: 'StringTypeAnnotation',
2252
+ },
2253
+ },
2254
+ params: [
2255
+ {
2256
+ name: 'error',
2257
+ optional: false,
2258
+ typeAnnotation: {
2259
+ type: 'BooleanTypeAnnotation',
2260
+ },
2261
+ },
2262
+ ],
2263
+ },
2264
+ },
2265
+ {
2266
+ name: 'getWithWithOptionalArgs',
2267
+ optional: false,
2268
+ typeAnnotation: {
2269
+ type: 'FunctionTypeAnnotation',
2270
+ returnTypeAnnotation: {
2271
+ type: 'NullableTypeAnnotation',
2272
+ typeAnnotation: {
2273
+ type: 'BooleanTypeAnnotation',
2274
+ },
2275
+ },
2276
+ params: [
2277
+ {
2278
+ name: 'optionalArg',
2279
+ optional: true,
2280
+ typeAnnotation: {
2281
+ type: 'BooleanTypeAnnotation',
2282
+ },
2283
+ },
2284
+ ],
2285
+ },
2286
+ },
2287
+ {
2288
+ name: 'voidFunc',
2289
+ optional: false,
2290
+ typeAnnotation: {
2291
+ type: 'FunctionTypeAnnotation',
2292
+ returnTypeAnnotation: {
2293
+ type: 'VoidTypeAnnotation',
2294
+ },
2295
+ params: [],
2296
+ },
2297
+ },
2298
+ {
2299
+ name: 'setMenu',
2300
+ optional: false,
2301
+ typeAnnotation: {
2302
+ type: 'FunctionTypeAnnotation',
2303
+ returnTypeAnnotation: {
2304
+ type: 'VoidTypeAnnotation',
2305
+ },
2306
+ params: [
2307
+ {
2308
+ name: 'menuItem',
2309
+ optional: false,
2310
+ typeAnnotation: {
2311
+ type: 'TypeAliasTypeAnnotation',
2312
+ name: 'MenuItem',
2313
+ },
2314
+ },
2315
+ ],
2316
+ },
2317
+ },
2318
+ {
2319
+ name: 'emitCustomDeviceEvent',
2320
+ optional: false,
2321
+ typeAnnotation: {
2322
+ type: 'FunctionTypeAnnotation',
2323
+ returnTypeAnnotation: {
2324
+ type: 'VoidTypeAnnotation',
2325
+ },
2326
+ params: [
2327
+ {
2328
+ name: 'eventName',
2329
+ optional: false,
2330
+ typeAnnotation: {
2331
+ type: 'StringTypeAnnotation',
2332
+ },
2333
+ },
2334
+ ],
2335
+ },
2336
+ },
2337
+ {
2338
+ name: 'voidFuncThrows',
2339
+ optional: false,
2340
+ typeAnnotation: {
2341
+ type: 'FunctionTypeAnnotation',
2342
+ returnTypeAnnotation: {
2343
+ type: 'VoidTypeAnnotation',
1776
2344
  },
1777
2345
  params: [],
1778
2346
  },
1779
2347
  },
2348
+
2349
+ {
2350
+ name: 'getObjectThrows',
2351
+ optional: false,
2352
+ typeAnnotation: {
2353
+ type: 'FunctionTypeAnnotation',
2354
+ returnTypeAnnotation: {
2355
+ type: 'TypeAliasTypeAnnotation',
2356
+ name: 'ObjectStruct',
2357
+ },
2358
+ params: [
2359
+ {
2360
+ name: 'arg',
2361
+ optional: false,
2362
+ typeAnnotation: {
2363
+ type: 'TypeAliasTypeAnnotation',
2364
+ name: 'ObjectStruct',
2365
+ },
2366
+ },
2367
+ ],
2368
+ },
2369
+ },
2370
+ {
2371
+ name: 'voidFuncAssert',
2372
+ optional: false,
2373
+ typeAnnotation: {
2374
+ type: 'FunctionTypeAnnotation',
2375
+ returnTypeAnnotation: {
2376
+ type: 'VoidTypeAnnotation',
2377
+ },
2378
+ params: [],
2379
+ },
2380
+ },
2381
+ {
2382
+ name: 'getObjectAssert',
2383
+ optional: false,
2384
+ typeAnnotation: {
2385
+ type: 'FunctionTypeAnnotation',
2386
+ returnTypeAnnotation: {
2387
+ type: 'TypeAliasTypeAnnotation',
2388
+ name: 'ObjectStruct',
2389
+ },
2390
+ params: [
2391
+ {
2392
+ name: 'arg',
2393
+ optional: false,
2394
+ typeAnnotation: {
2395
+ type: 'TypeAliasTypeAnnotation',
2396
+ name: 'ObjectStruct',
2397
+ },
2398
+ },
2399
+ ],
2400
+ },
2401
+ },
1780
2402
  ],
1781
2403
  },
1782
2404
  moduleName: 'SampleTurboModuleCxx',