@react-native/codegen 0.75.0-nightly-20240229-21171222e → 0.75.0-nightly-20240302-7d4778104
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.
|
@@ -161,6 +161,12 @@ function serializeArg(moduleName, arg, index, resolveAlias, enumMap) {
|
|
|
161
161
|
const val = `args[${index}]`;
|
|
162
162
|
const expression = callback(val);
|
|
163
163
|
|
|
164
|
+
// param?: T
|
|
165
|
+
if (optional && !nullable) {
|
|
166
|
+
// throw new Error('are we hitting this case? ' + moduleName);
|
|
167
|
+
return `count <= ${index} || ${val}.isUndefined() ? std::nullopt : std::make_optional(${expression})`;
|
|
168
|
+
}
|
|
169
|
+
|
|
164
170
|
// param: ?T
|
|
165
171
|
// param?: ?T
|
|
166
172
|
if (nullable || optional) {
|
|
@@ -132,6 +132,12 @@ function serializeArg(
|
|
|
132
132
|
const val = `args[${index}]`;
|
|
133
133
|
const expression = callback(val);
|
|
134
134
|
|
|
135
|
+
// param?: T
|
|
136
|
+
if (optional && !nullable) {
|
|
137
|
+
// throw new Error('are we hitting this case? ' + moduleName);
|
|
138
|
+
return `count <= ${index} || ${val}.isUndefined() ? std::nullopt : std::make_optional(${expression})`;
|
|
139
|
+
}
|
|
140
|
+
|
|
135
141
|
// param: ?T
|
|
136
142
|
// param?: ?T
|
|
137
143
|
if (nullable || optional) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/codegen",
|
|
3
|
-
"version": "0.75.0-nightly-
|
|
3
|
+
"version": "0.75.0-nightly-20240302-7d4778104",
|
|
4
4
|
"description": "Code generation tools for React Native",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/parser": "^7.20.0",
|
|
33
33
|
"glob": "^7.1.1",
|
|
34
|
-
"hermes-parser": "0.
|
|
34
|
+
"hermes-parser": "0.20.0",
|
|
35
35
|
"invariant": "^2.2.4",
|
|
36
36
|
"jscodeshift": "^0.14.0",
|
|
37
37
|
"mkdirp": "^0.5.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
|
|
50
50
|
"@babel/preset-env": "^7.20.0",
|
|
51
51
|
"chalk": "^4.0.0",
|
|
52
|
-
"hermes-estree": "0.
|
|
52
|
+
"hermes-estree": "0.20.0",
|
|
53
53
|
"micromatch": "^4.0.4",
|
|
54
54
|
"prettier": "2.8.8",
|
|
55
55
|
"rimraf": "^3.0.2",
|