Files
react/packages/shared/ReactTypes.js
Brian Vaughn 3322f6bf31 Re-add haste modules for ReactTypes and ReactNativeRTTypes shims (#11557)
* Re-add haste module for ReactNativeRTTypes

* Re-added ReactTypes @providesModule annotation as well

* Updated expected provides modules list

* Improved clarity of check_modules.sh error message

* Added ReactTypes to provides module whitelist
2017-11-15 08:17:15 -08:00

49 lines
1.1 KiB
JavaScript

/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule ReactTypes
*/
export type ReactNode =
| React$Element<any>
| ReactCall
| ReactReturn
| ReactPortal
| ReactText
| ReactFragment;
export type ReactFragment = ReactEmpty | Iterable<React$Node>;
export type ReactNodeList = ReactEmpty | React$Node;
export type ReactText = string | number;
export type ReactEmpty = null | void | boolean;
export type ReactCall = {
$$typeof: Symbol | number,
key: null | string,
children: any,
// This should be a more specific CallHandler
handler: (props: any, returns: Array<mixed>) => ReactNodeList,
props: any,
};
export type ReactReturn = {
$$typeof: Symbol | number,
value: mixed,
};
export type ReactPortal = {
$$typeof: Symbol | number,
key: null | string,
containerInfo: any,
children: ReactNodeList,
// TODO: figure out the API for cross-renderer implementation.
implementation: any,
};