mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
90f8fe6f55
This PR adds the jsx-runtime and jsx-dev-runtime modules for the JSX Babel Plugin. WWW still relies on jsx/jsxs/jsxDEV from the "react" module, so once we refactor the code to point to the runtime modules we will remove jsx/jsxs/jsxDEV from the "react" module.
80 lines
2.0 KiB
JavaScript
80 lines
2.0 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
// Keep in sync with https://github.com/facebook/flow/blob/master/lib/react.js
|
|
export type StatelessFunctionalComponent<
|
|
P,
|
|
> = React$StatelessFunctionalComponent<P>;
|
|
export type ComponentType<-P> = React$ComponentType<P>;
|
|
export type AbstractComponent<
|
|
-Config,
|
|
+Instance = mixed,
|
|
> = React$AbstractComponent<Config, Instance>;
|
|
export type ElementType = React$ElementType;
|
|
export type Element<+C> = React$Element<C>;
|
|
export type Key = React$Key;
|
|
export type Ref<C> = React$Ref<C>;
|
|
export type Node = React$Node;
|
|
export type Context<T> = React$Context<T>;
|
|
export type Portal = React$Portal;
|
|
export type ElementProps<C> = React$ElementProps<C>;
|
|
export type ElementConfig<C> = React$ElementConfig<C>;
|
|
export type ElementRef<C> = React$ElementRef<C>;
|
|
export type Config<Props, DefaultProps> = React$Config<Props, DefaultProps>;
|
|
export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
|
|
export type Interaction = {
|
|
name: string,
|
|
timestamp: number,
|
|
...
|
|
};
|
|
|
|
// Export all exports so that they're available in tests.
|
|
// We can't use export * from in Flow for some reason.
|
|
export {
|
|
Children,
|
|
createRef,
|
|
Component,
|
|
PureComponent,
|
|
createContext,
|
|
forwardRef,
|
|
lazy,
|
|
memo,
|
|
useCallback,
|
|
useContext,
|
|
useEffect,
|
|
useImperativeHandle,
|
|
useDebugValue,
|
|
useLayoutEffect,
|
|
useMemo,
|
|
useReducer,
|
|
useRef,
|
|
useState,
|
|
useMutableSource,
|
|
createMutableSource,
|
|
Fragment,
|
|
Profiler,
|
|
StrictMode,
|
|
Suspense,
|
|
createElement,
|
|
cloneElement,
|
|
isValidElement,
|
|
version,
|
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
|
|
createFactory,
|
|
useTransition,
|
|
useDeferredValue,
|
|
SuspenseList,
|
|
unstable_withSuspenseConfig,
|
|
block,
|
|
DEPRECATED_useResponder,
|
|
DEPRECATED_createResponder,
|
|
unstable_createFundamental,
|
|
unstable_createScope,
|
|
} from './src/React';
|