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:
Tim Yung authored and Facebook GitHub Bot committed 2020-04-23 12:41:41 -07:00
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);
}