@react-native/codegen 0.74.0-nightly-20231205-ff7768038 → 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.
|
@@ -1697,6 +1697,65 @@ const CXX_ONLY_NATIVE_MODULES = {
|
|
|
1697
1697
|
},
|
|
1698
1698
|
],
|
|
1699
1699
|
},
|
|
1700
|
+
MenuItem: {
|
|
1701
|
+
type: 'ObjectTypeAnnotation',
|
|
1702
|
+
properties: [
|
|
1703
|
+
{
|
|
1704
|
+
name: 'label',
|
|
1705
|
+
optional: false,
|
|
1706
|
+
typeAnnotation: {
|
|
1707
|
+
type: 'StringTypeAnnotation',
|
|
1708
|
+
},
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
name: 'onPress',
|
|
1712
|
+
optional: false,
|
|
1713
|
+
typeAnnotation: {
|
|
1714
|
+
type: 'FunctionTypeAnnotation',
|
|
1715
|
+
returnTypeAnnotation: {
|
|
1716
|
+
type: 'VoidTypeAnnotation',
|
|
1717
|
+
},
|
|
1718
|
+
params: [
|
|
1719
|
+
{
|
|
1720
|
+
name: 'value',
|
|
1721
|
+
optional: false,
|
|
1722
|
+
typeAnnotation: {
|
|
1723
|
+
type: 'StringTypeAnnotation',
|
|
1724
|
+
},
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
name: 'flag',
|
|
1728
|
+
optional: false,
|
|
1729
|
+
typeAnnotation: {
|
|
1730
|
+
type: 'BooleanTypeAnnotation',
|
|
1731
|
+
},
|
|
1732
|
+
},
|
|
1733
|
+
],
|
|
1734
|
+
},
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
name: 'shortcut',
|
|
1738
|
+
optional: true,
|
|
1739
|
+
typeAnnotation: {
|
|
1740
|
+
type: 'NullableTypeAnnotation',
|
|
1741
|
+
typeAnnotation: {
|
|
1742
|
+
type: 'StringTypeAnnotation',
|
|
1743
|
+
},
|
|
1744
|
+
},
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
name: 'items',
|
|
1748
|
+
optional: true,
|
|
1749
|
+
typeAnnotation: {
|
|
1750
|
+
type: 'ArrayTypeAnnotation',
|
|
1751
|
+
elementType: {
|
|
1752
|
+
type: 'TypeAliasTypeAnnotation',
|
|
1753
|
+
name: 'MenuItem',
|
|
1754
|
+
},
|
|
1755
|
+
},
|
|
1756
|
+
},
|
|
1757
|
+
],
|
|
1758
|
+
},
|
|
1700
1759
|
},
|
|
1701
1760
|
enumMap: {
|
|
1702
1761
|
EnumInt: {
|
|
@@ -2227,6 +2286,26 @@ const CXX_ONLY_NATIVE_MODULES = {
|
|
|
2227
2286
|
params: [],
|
|
2228
2287
|
},
|
|
2229
2288
|
},
|
|
2289
|
+
{
|
|
2290
|
+
name: 'setMenu',
|
|
2291
|
+
optional: false,
|
|
2292
|
+
typeAnnotation: {
|
|
2293
|
+
type: 'FunctionTypeAnnotation',
|
|
2294
|
+
returnTypeAnnotation: {
|
|
2295
|
+
type: 'VoidTypeAnnotation',
|
|
2296
|
+
},
|
|
2297
|
+
params: [
|
|
2298
|
+
{
|
|
2299
|
+
name: 'menuItem',
|
|
2300
|
+
optional: false,
|
|
2301
|
+
typeAnnotation: {
|
|
2302
|
+
type: 'TypeAliasTypeAnnotation',
|
|
2303
|
+
name: 'MenuItem',
|
|
2304
|
+
},
|
|
2305
|
+
},
|
|
2306
|
+
],
|
|
2307
|
+
},
|
|
2308
|
+
},
|
|
2230
2309
|
{
|
|
2231
2310
|
name: 'emitCustomDeviceEvent',
|
|
2232
2311
|
optional: false,
|
|
@@ -1706,6 +1706,65 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = {
|
|
|
1706
1706
|
},
|
|
1707
1707
|
],
|
|
1708
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
|
+
},
|
|
1766
|
+
],
|
|
1767
|
+
},
|
|
1709
1768
|
},
|
|
1710
1769
|
enumMap: {
|
|
1711
1770
|
EnumInt: {
|
|
@@ -2236,6 +2295,26 @@ const CXX_ONLY_NATIVE_MODULES: SchemaType = {
|
|
|
2236
2295
|
params: [],
|
|
2237
2296
|
},
|
|
2238
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
|
+
},
|
|
2239
2318
|
{
|
|
2240
2319
|
name: 'emitCustomDeviceEvent',
|
|
2241
2320
|
optional: false,
|
|
@@ -321,7 +321,7 @@ function parseObjectProperty(
|
|
|
321
321
|
propertyTypeAnnotation = _unwrapNullable2[0],
|
|
322
322
|
isPropertyNullable = _unwrapNullable2[1];
|
|
323
323
|
if (
|
|
324
|
-
propertyTypeAnnotation.type === 'FunctionTypeAnnotation' ||
|
|
324
|
+
(propertyTypeAnnotation.type === 'FunctionTypeAnnotation' && !cxxOnly) ||
|
|
325
325
|
propertyTypeAnnotation.type === 'PromiseTypeAnnotation' ||
|
|
326
326
|
propertyTypeAnnotation.type === 'VoidTypeAnnotation'
|
|
327
327
|
) {
|
|
@@ -235,7 +235,7 @@ function parseObjectProperty(
|
|
|
235
235
|
);
|
|
236
236
|
|
|
237
237
|
if (
|
|
238
|
-
propertyTypeAnnotation.type === 'FunctionTypeAnnotation' ||
|
|
238
|
+
(propertyTypeAnnotation.type === 'FunctionTypeAnnotation' && !cxxOnly) ||
|
|
239
239
|
propertyTypeAnnotation.type === 'PromiseTypeAnnotation' ||
|
|
240
240
|
propertyTypeAnnotation.type === 'VoidTypeAnnotation'
|
|
241
241
|
) {
|