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