RN: Fix Remaining ReactElement References

Summary: Fixes remaining references to `ReactElement` that did not already have `React` in scope.

Reviewed By: bestander, vjeux

Differential Revision: D4022022

fbshipit-source-id: 4aeacee0cdbb2c825feba10282208316d064c578
This commit is contained in:
Tim Yung 2016-10-14 10:40:15 -07:00 committed by Facebook Github Bot
parent e8198aed8d
commit b77b760810
3 changed files with 13 additions and 7 deletions

View File

@ -23,16 +23,18 @@
*/ */
'use strict'; 'use strict';
import type React from 'react';
export type Example = { export type Example = {
title: string, title: string,
render: () => ?React.Element<any>, render: () => ?React.Element<any>,
description?: string, description?: string,
platform?: string; platform?: string,
}; };
export type ExampleModule = { export type ExampleModule = {
title: string; title: string,
description: string; description: string,
examples: Array<Example>; examples: Array<Example>,
external?: bool; external?: bool,
}; };

View File

@ -13,6 +13,8 @@
const Animated = require('Animated'); const Animated = require('Animated');
import type React from 'react';
// Object Instances // Object Instances
export type NavigationAnimatedValue = Animated.Value; export type NavigationAnimatedValue = Animated.Value;
@ -112,7 +114,7 @@ export type NavigationAnimationSetter = (
export type NavigationSceneRenderer = ( export type NavigationSceneRenderer = (
props: NavigationSceneRendererProps, props: NavigationSceneRendererProps,
) => ?ReactElement<any>; ) => ?React.Element<any>;
export type NavigationStyleInterpolator = ( export type NavigationStyleInterpolator = (
props: NavigationSceneRendererProps, props: NavigationSceneRendererProps,

View File

@ -18,6 +18,8 @@ const defineLazyObjectProperty = require('defineLazyObjectProperty');
const findNodeHandle = require('react/lib/findNodeHandle'); const findNodeHandle = require('react/lib/findNodeHandle');
const invariant = require('fbjs/lib/invariant'); const invariant = require('fbjs/lib/invariant');
import type React from 'react';
const { UIManager } = NativeModules; const { UIManager } = NativeModules;
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.'); invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
@ -42,7 +44,7 @@ const _takeSnapshot = UIManager.takeSnapshot;
* @platform ios * @platform ios
*/ */
UIManager.takeSnapshot = async function( UIManager.takeSnapshot = async function(
view ?: 'window' | ReactElement<any> | number, view ?: 'window' | React.Element<any> | number,
options ?: { options ?: {
width ?: number, width ?: number,
height ?: number, height ?: number,