@react-native/codegen 0.73.0-nightly-20230922-2fb4547aa → 0.73.0-nightly-20230923-29f62a41b
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.
|
@@ -14,6 +14,7 @@ const _require = require('../utils.js'),
|
|
|
14
14
|
getValueFromTypes = _require.getValueFromTypes;
|
|
15
15
|
const _require2 = require('../../parsers-commons'),
|
|
16
16
|
verifyPropNotAlreadyDefined = _require2.verifyPropNotAlreadyDefined;
|
|
17
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
17
18
|
function getTypeAnnotationForArray(
|
|
18
19
|
name,
|
|
19
20
|
typeAnnotation,
|
|
@@ -190,6 +191,8 @@ function flattenProperties(typeDefinition, types, parser) {
|
|
|
190
191
|
}, [])
|
|
191
192
|
.filter(Boolean);
|
|
192
193
|
}
|
|
194
|
+
|
|
195
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
193
196
|
function getTypeAnnotation(
|
|
194
197
|
name,
|
|
195
198
|
annotation,
|
|
@@ -15,6 +15,7 @@ const {verifyPropNotAlreadyDefined} = require('../../parsers-commons');
|
|
|
15
15
|
import type {TypeDeclarationMap, PropAST, ASTNode} from '../../utils';
|
|
16
16
|
import type {BuildSchemaFN, Parser} from '../../parser';
|
|
17
17
|
|
|
18
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
18
19
|
function getTypeAnnotationForArray<+T>(
|
|
19
20
|
name: string,
|
|
20
21
|
typeAnnotation: $FlowFixMe,
|
|
@@ -206,6 +207,7 @@ function flattenProperties(
|
|
|
206
207
|
.filter(Boolean);
|
|
207
208
|
}
|
|
208
209
|
|
|
210
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
209
211
|
function getTypeAnnotation<+T>(
|
|
210
212
|
name: string,
|
|
211
213
|
annotation: $FlowFixMe | ASTNode,
|
|
@@ -189,12 +189,16 @@ function wrapModuleSchema(nativeModuleSchema, hasteModuleName) {
|
|
|
189
189
|
},
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
+
|
|
193
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
192
194
|
function unwrapNullable(x) {
|
|
193
195
|
if (x.type === 'NullableTypeAnnotation') {
|
|
194
196
|
return [x.typeAnnotation, true];
|
|
195
197
|
}
|
|
196
198
|
return [x, false];
|
|
197
199
|
}
|
|
200
|
+
|
|
201
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
198
202
|
function wrapNullable(nullable, typeAnnotation) {
|
|
199
203
|
if (!nullable) {
|
|
200
204
|
return typeAnnotation;
|
|
@@ -105,6 +105,7 @@ function wrapModuleSchema(
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
108
109
|
function unwrapNullable<+T: NativeModuleTypeAnnotation>(
|
|
109
110
|
x: Nullable<T>,
|
|
110
111
|
): [T, boolean] {
|
|
@@ -115,6 +116,7 @@ function unwrapNullable<+T: NativeModuleTypeAnnotation>(
|
|
|
115
116
|
return [x, false];
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
118
120
|
function wrapNullable<+T: NativeModuleTypeAnnotation>(
|
|
119
121
|
nullable: boolean,
|
|
120
122
|
typeAnnotation: T,
|