Skip to content

Commit

Permalink
RN: Fix Remaining ReactElement References
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yungsters authored and Facebook Github Bot committed Oct 14, 2016
1 parent e8198ae commit b77b760
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
12 changes: 7 additions & 5 deletions Examples/UIExplorer/js/ExampleTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@
*/
'use strict';

import type React from 'react';

export type Example = {
title: string,
render: () => ?React.Element<any>,
description?: string,
platform?: string;
platform?: string,
};

export type ExampleModule = {
title: string;
description: string;
examples: Array<Example>;
external?: bool;
title: string,
description: string,
examples: Array<Example>,
external?: bool,
};
4 changes: 3 additions & 1 deletion Libraries/NavigationExperimental/NavigationTypeDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

const Animated = require('Animated');

import type React from 'react';

// Object Instances

export type NavigationAnimatedValue = Animated.Value;
Expand Down Expand Up @@ -112,7 +114,7 @@ export type NavigationAnimationSetter = (

export type NavigationSceneRenderer = (
props: NavigationSceneRendererProps,
) => ?ReactElement<any>;
) => ?React.Element<any>;

export type NavigationStyleInterpolator = (
props: NavigationSceneRendererProps,
Expand Down
4 changes: 3 additions & 1 deletion Libraries/ReactNative/UIManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const defineLazyObjectProperty = require('defineLazyObjectProperty');
const findNodeHandle = require('react/lib/findNodeHandle');
const invariant = require('fbjs/lib/invariant');

import type React from 'react';

const { UIManager } = NativeModules;

invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
Expand All @@ -42,7 +44,7 @@ const _takeSnapshot = UIManager.takeSnapshot;
* @platform ios
*/
UIManager.takeSnapshot = async function(
view ?: 'window' | ReactElement<any> | number,
view ?: 'window' | React.Element<any> | number,
options ?: {
width ?: number,
height ?: number,
Expand Down

0 comments on commit b77b760

Please sign in to comment.