mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add recursive imports for Array types
Summary: Supporting the native primitives fixture added in the previous diff Reviewed By: JoshuaGross Differential Revision: D16846289 fbshipit-source-id: 4c6afdabba0fe4b55990d25adec21cf65d8beff3
This commit is contained in:
committed by
Facebook Github Bot
parent
6ee5679582
commit
685a25ca2e
@@ -494,6 +494,16 @@ function getLocalImports(
|
||||
addImportsForNativeName(typeAnnotation.elementType.name);
|
||||
}
|
||||
|
||||
if (
|
||||
typeAnnotation.type === 'ArrayTypeAnnotation' &&
|
||||
typeAnnotation.elementType.type === 'ObjectTypeAnnotation'
|
||||
) {
|
||||
const localImports = getLocalImports(
|
||||
typeAnnotation.elementType.properties,
|
||||
);
|
||||
localImports.forEach(imports.add, imports);
|
||||
}
|
||||
|
||||
if (typeAnnotation.type === 'ObjectTypeAnnotation') {
|
||||
imports.add('#include <react/core/propsConversions.h>');
|
||||
const objectImports = getImports(typeAnnotation.properties);
|
||||
|
||||
+3
@@ -138,6 +138,9 @@ Map {
|
||||
#pragma once
|
||||
|
||||
#include <react/components/view/ViewProps.h>
|
||||
#include <react/graphics/Color.h>
|
||||
#include <react/graphics/Geometry.h>
|
||||
#include <react/imagemanager/primitives.h>
|
||||
#include <vector>
|
||||
|
||||
namespace facebook {
|
||||
|
||||
Reference in New Issue
Block a user