main
js 77 lines 1.79 KB
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @flow
8 */
9
10 // Keep in sync with https://github.com/facebook/flow/blob/main/lib/react.js
11 export type ElementType = React$ElementType;
12 export type Element<+C> = React$Element<C>;
13 export type MixedElement = React$Element<ElementType>;
14 export type Key = React$Key;
15 export type Node = React$Node;
16 // eslint-disable-next-line no-undef
17 export type Context<T> = React.Context<T>;
18 export type Portal = React$Portal;
19 // eslint-disable-next-line no-undef
20 export type RefSetter<-I> = React.RefSetter<I>;
21 export type ElementProps<C> = React$ElementConfig<C>;
22 export type ElementConfig<C> = React$ElementConfig<C>;
23 // eslint-disable-next-line no-undef
24 export type ElementRef<C> = React.ElementRef<C>;
25 export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
26
27 export {
28 __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
29 __COMPILER_RUNTIME,
30 Children,
31 Component,
32 Fragment,
33 Profiler,
34 PureComponent,
35 StrictMode,
36 Suspense,
37 cloneElement,
38 createContext,
39 createElement,
40 createRef,
41 use,
42 forwardRef,
43 isValidElement,
44 lazy,
45 memo,
46 cache,
47 cacheSignal,
48 startTransition,
49 unstable_LegacyHidden,
50 Activity,
51 unstable_Scope,
52 unstable_SuspenseList,
53 unstable_TracingMarker,
54 ViewTransition,
55 addTransitionType,
56 unstable_getCacheForType,
57 unstable_useCacheRefresh,
58 useId,
59 useCallback,
60 useContext,
61 useDebugValue,
62 useDeferredValue,
63 useEffect,
64 useEffectEvent,
65 useImperativeHandle,
66 useInsertionEffect,
67 useLayoutEffect,
68 useMemo,
69 useOptimistic,
70 useSyncExternalStore,
71 useReducer,
72 useRef,
73 useState,
74 useTransition,
75 useActionState,
76 version,
77 } from './src/ReactClient';