Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/legacy-events/PluginModuleType.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
DispatchConfig,
ReactSyntheticEvent,
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy-events/ReactSyntheticEventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {EventPriority} from 'shared/ReactTypes';
import type {TopLevelType} from './TopLevelEventTypes';

Expand Down
16 changes: 13 additions & 3 deletions packages/react-debug-tools/src/ReactDebugHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ import type {
ReactEventResponderListener,
ReactScopeMethods,
} from 'shared/ReactTypes';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {
Fiber,
Dispatcher as DispatcherType,
} from 'react-reconciler/src/ReactInternalTypes';
import type {OpaqueIDType} from 'react-reconciler/src/ReactFiberHostConfig';

import type {Hook, TimeoutConfig} from 'react-reconciler/src/ReactFiberHooks';
import type {Dispatcher as DispatcherType} from 'react-reconciler/src/ReactFiberHooks';
import type {SuspenseConfig} from 'react-reconciler/src/ReactFiberSuspenseConfig';
import {NoMode} from 'react-reconciler/src/ReactTypeOfMode';

Expand Down Expand Up @@ -67,6 +68,15 @@ let primitiveStackCache: null | Map<string, Array<any>> = null;

let currentFiber: Fiber | null = null;

type Hook = {
memoizedState: any,
next: Hook | null,
};

type TimeoutConfig = {|
timeoutMs: number,
|};

function getPrimitiveStackCache(): Map<string, Array<any>> {
// This initializes a cache of all primitive hooks so that the top
// most stack frames added by calling the primitive hook can be removed.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/backend/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import {getInternalReactConstants} from './renderer';
import describeComponentFrame from './describeComponentFrame';

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {ReactRenderer} from './types';

const APPEND_STACK_TO_METHODS = ['error', 'trace', 'warn'];
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/backend/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
registerRenderer as registerRendererWithConsole,
} from './console';

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
ChangeDescription,
CommitDataBackend,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/backend/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import type {ReactContext} from 'shared/ReactTypes';
import type {Source} from 'shared/ReactElementType';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
ComponentFilter,
ElementType,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/client/ReactDOMComponentTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
Container,
TextInstance,
Expand Down
4 changes: 1 addition & 3 deletions packages/react-dom/src/client/ReactDOMRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
import type {Container} from './ReactDOMHostConfig';
import type {RootTag} from 'react-reconciler/src/ReactRootTags';
import type {ReactNodeList} from 'shared/ReactTypes';
// TODO: This type is shared between the reconciler and ReactDOM, but will
// eventually be lifted out to the renderer.
import type {FiberRoot} from 'react-reconciler/src/ReactFiberRoot';
import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes';
import {findHostInstanceWithNoPortals} from 'react-reconciler/src/ReactFiberReconciler';

export type RootType = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {AnyNativeEvent} from 'legacy-events/PluginModuleType';
import type {DOMTopLevelEventType} from 'legacy-events/TopLevelEventTypes';
import type {ElementListenerMap} from '../events/DOMEventListenerMap';
import type {EventSystemFlags} from './EventSystemFlags';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {PluginModule} from 'legacy-events/PluginModuleType';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';
import type {TopLevelType} from 'legacy-events/TopLevelEventTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
} from '../events/DOMEventListenerMap';
import type {EventSystemFlags} from './EventSystemFlags';
import type {EventPriority, ReactScopeMethods} from 'shared/ReactTypes';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {PluginModule} from 'legacy-events/PluginModuleType';
import type {
ReactSyntheticEvent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
flushDiscreteUpdatesIfNeeded,
executeUserEventHandler,
} from './ReactDOMUpdateBatching';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import {enableDeprecatedFlareAPI} from 'shared/ReactFeatureFlags';
import invariant from 'shared/invariant';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/ReactDOMEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import type {AnyNativeEvent} from 'legacy-events/PluginModuleType';
import type {EventPriority} from 'shared/ReactTypes';
import type {FiberRoot} from 'react-reconciler/src/ReactFiberRoot';
import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes';
import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig';
import type {DOMTopLevelEventType} from 'legacy-events/TopLevelEventTypes';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/ReactDOMEventReplaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {Container, SuspenseInstance} from '../client/ReactDOMHostConfig';
import type {DOMTopLevelEventType} from 'legacy-events/TopLevelEventTypes';
import type {ElementListenerMap} from '../events/DOMEventListenerMap';
import type {EventSystemFlags} from './EventSystemFlags';
import type {FiberRoot} from 'react-reconciler/src/ReactFiberRoot';
import type {FiberRoot} from 'react-reconciler/src/ReactInternalTypes';

import {
enableDeprecatedFlareAPI,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/SimpleEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
DOMTopLevelEventType,
} from 'legacy-events/TopLevelEventTypes';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {PluginModule} from 'legacy-events/PluginModuleType';
import type {EventSystemFlags} from './EventSystemFlags';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';

import {HostComponent} from 'react-reconciler/src/ReactWorkTags';
Expand Down Expand Up @@ -82,7 +82,7 @@ function accumulateEnterLeaveListenersForEvent(
return;
}
const dispatchListeners = [];
const dispatchInstances = [];
const dispatchInstances: Array<Fiber | null> = [];
const dispatchCurrentTargets = [];

let instance = target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {DOMTopLevelEventType} from 'legacy-events/TopLevelEventTypes';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';

Expand All @@ -17,7 +18,7 @@ export default function accumulateEventTargetListeners(
currentTarget: EventTarget,
): void {
const dispatchListeners = [];
const dispatchInstances = [];
const dispatchInstances: Array<Fiber | null> = [];
const dispatchCurrentTargets = [];

const eventTypeMap = eventTargetEventListenerStore.get(currentTarget);
Expand Down
3 changes: 2 additions & 1 deletion packages/react-dom/src/events/accumulateTwoPhaseListeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {DOMTopLevelEventType} from 'legacy-events/TopLevelEventTypes';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';

Expand All @@ -30,7 +31,7 @@ export default function accumulateTwoPhaseListeners(
): void {
const phasedRegistrationNames = event.dispatchConfig.phasedRegistrationNames;
const dispatchListeners = [];
const dispatchInstances = [];
const dispatchInstances: Array<Fiber | null> = [];
const dispatchCurrentTargets = [];

const {bubbled, captured} = phasedRegistrationNames;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/getListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {Props} from '../client/ReactDOMHostConfig';

import invariant from 'shared/invariant';
Expand Down
9 changes: 5 additions & 4 deletions packages/react-dom/src/server/ReactPartialRendererHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
* @flow
*/

import type {
Dispatcher as DispatcherType,
TimeoutConfig,
} from 'react-reconciler/src/ReactFiberHooks';
import type {Dispatcher as DispatcherType} from 'react-reconciler/src/ReactInternalTypes';
import type {ThreadID} from './ReactThreadIDAllocator';
import type {OpaqueIDType} from 'react-reconciler/src/ReactFiberHostConfig';

Expand Down Expand Up @@ -49,6 +46,10 @@ type Hook = {|
next: Hook | null,
|};

type TimeoutConfig = {|
timeoutMs: number,
|};

let currentlyRenderingComponent: Object | null = null;
let firstWorkInProgressHook: Hook | null = null;
let workInProgressHook: Hook | null = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import type {AnyNativeEvent} from 'legacy-events/PluginModuleType';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {PluginModule} from 'legacy-events/PluginModuleType';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';
import type {TopLevelType} from 'legacy-events/TopLevelEventTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import type {AnyNativeEvent} from 'legacy-events/PluginModuleType';
import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {PluginModule} from 'legacy-events/PluginModuleType';
import type {ReactSyntheticEvent} from 'legacy-events/ReactSyntheticEventType';
import type {TopLevelType} from 'legacy-events/TopLevelEventTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {TouchedViewDataAtPoint, InspectorData} from './ReactNativeTypes';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @flow
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';

import invariant from 'shared/invariant';
import {getFiberCurrentPropsFromNode} from 'legacy-events/EventPluginUtils';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/src/createReactNoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* environment.
*/

import type {Fiber} from 'react-reconciler/src/ReactFiber';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {UpdateQueue} from 'react-reconciler/src/ReactUpdateQueue';
import type {ReactNodeList} from 'shared/ReactTypes';
import type {RootTag} from 'react-reconciler/src/ReactRootTags';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactCapturedValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {Fiber} from './ReactFiber';
import type {Fiber} from './ReactInternalTypes';

import {getStackByFiberInDevAndProd} from './ReactFiberComponentStack';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {ReactElement} from 'shared/ReactElementType';
import type {ReactPortal} from 'shared/ReactTypes';
import type {BlockComponent} from 'react/src/ReactBlock';
import type {LazyComponent} from 'react/src/ReactLazy';
import type {Fiber} from './ReactFiber';
import type {Fiber} from './ReactInternalTypes';
import type {ExpirationTime} from './ReactFiberExpirationTime';

import getComponentName from 'shared/getComponentName';
Expand Down Expand Up @@ -42,11 +42,11 @@ import {
createFiberFromFragment,
createFiberFromText,
createFiberFromPortal,
} from './ReactFiber';
import {emptyRefsObject} from './ReactFiberClassComponent';
} from './ReactFiber.new';
import {emptyRefsObject} from './ReactFiberClassComponent.new';
import {getStackByFiberInDevAndProd} from './ReactFiberComponentStack';
import {getCurrentFiberStackInDev} from './ReactCurrentFiber';
import {isCompatibleFamilyForHotReloading} from './ReactFiberHotReloading';
import {isCompatibleFamilyForHotReloading} from './ReactFiberHotReloading.new';
import {StrictMode} from './ReactTypeOfMode';

let didWarnAboutMaps;
Expand Down
Loading