mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
RN: Rename {NativePrimitive => ReservedProp}TypeAnnotation in Codegen
Summary: Straightforward rename to clarify the purpose of this type. The current naming made more sense before the codegen also produced code for NativeModules. Changelog: [Internal] Reviewed By: TheSavior Differential Revision: D21160793 fbshipit-source-id: 6787ef298e32ff1b4d506afd831af96764f5af6f
This commit is contained in:
1 parent
ab9b212de8
commit
1b2bcb180c
11 files changed
+105
-109
No files matched your search
@@ -78,16 +78,14 @@ function getImports(
|
||||
return;
|
||||
default:
|
||||
(name: empty);
|
||||
throw new Error(
|
||||
`Invalid NativePrimitiveTypeAnnotation name, got ${name}`,
|
||||
);
|
||||
throw new Error(`Invalid ReservedPropTypeAnnotation name, got ${name}`);
|
||||
}
|
||||
}
|
||||
|
||||
component.props.forEach(prop => {
|
||||
const typeAnnotation = prop.typeAnnotation;
|
||||
|
||||
if (typeAnnotation.type === 'NativePrimitiveTypeAnnotation') {
|
||||
if (typeAnnotation.type === 'ReservedPropTypeAnnotation') {
|
||||
addImportsForNativeName(typeAnnotation.name);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user