1010/* eslint-disable react-internal/prod-error-codes */
1111
1212import type { ReactElement } from 'shared/ReactElementType' ;
13- import type { Fiber } from './ReactInternalTypes' ;
14- import type { FiberRoot } from './ReactInternalTypes' ;
13+ import type { Fiber , FiberRoot } from './ReactInternalTypes' ;
1514import type { Instance } from './ReactFiberHostConfig' ;
1615import type { ReactNodeList } from 'shared/ReactTypes' ;
1716
17+ import type {
18+ Family ,
19+ FindHostInstancesForRefresh ,
20+ RefreshHandler ,
21+ RefreshUpdate ,
22+ ScheduleRefresh ,
23+ ScheduleRoot ,
24+ } from './ReactFiberHotReloading' ;
25+
1826import {
1927 flushSync ,
2028 scheduleUpdateOnFiber ,
@@ -40,27 +48,6 @@ import {
4048 REACT_LAZY_TYPE ,
4149} from 'shared/ReactSymbols' ;
4250
43- export type Family = {
44- current : any ,
45- } ;
46-
47- export type RefreshUpdate = {
48- staleFamilies : Set < Family > ,
49- updatedFamilies : Set < Family > ,
50- } ;
51-
52- // Resolves type to a family.
53- type RefreshHandler = any => Family | void ;
54-
55- // Used by React Refresh runtime through DevTools Global Hook.
56- export type SetRefreshHandler = ( handler : RefreshHandler | null ) => void ;
57- export type ScheduleRefresh = ( root : FiberRoot , update : RefreshUpdate ) => void ;
58- export type ScheduleRoot = ( root : FiberRoot , element : ReactNodeList ) => void ;
59- export type FindHostInstancesForRefresh = (
60- root : FiberRoot ,
61- families : Array < Family > ,
62- ) => Set < Instance > ;
63-
6451let resolveFamily : RefreshHandler | null = null ;
6552// $FlowFixMe Flow gets confused by a WeakSet feature check below.
6653let failedBoundaries : WeakSet < Fiber > | null = null ;
0 commit comments