From 2e7f422fea445c232c4723b97e0351aa93eeaa00 Mon Sep 17 00:00:00 2001 From: bubucuo Date: Thu, 1 Sep 2022 22:43:40 +0800 Subject: [PATCH] Refactor: its type is Container (#25153) --- packages/react-reconciler/src/ReactFiberRoot.new.js | 3 ++- packages/react-reconciler/src/ReactFiberRoot.old.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberRoot.new.js b/packages/react-reconciler/src/ReactFiberRoot.new.js index 892fe78ac1b1e..beaa5f509bc95 100644 --- a/packages/react-reconciler/src/ReactFiberRoot.new.js +++ b/packages/react-reconciler/src/ReactFiberRoot.new.js @@ -15,6 +15,7 @@ import type { } from './ReactInternalTypes'; import type {RootTag} from './ReactRootTags'; import type {Cache} from './ReactFiberCacheComponent.new'; +import type {Container} from './ReactFiberHostConfig'; import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; import {createHostRootFiber} from './ReactFiber.new'; @@ -128,7 +129,7 @@ function FiberRootNode( } export function createFiberRoot( - containerInfo: any, + containerInfo: Container, tag: RootTag, hydrate: boolean, initialChildren: ReactNodeList, diff --git a/packages/react-reconciler/src/ReactFiberRoot.old.js b/packages/react-reconciler/src/ReactFiberRoot.old.js index f7e16f0bbdcc8..11221f86a8f4c 100644 --- a/packages/react-reconciler/src/ReactFiberRoot.old.js +++ b/packages/react-reconciler/src/ReactFiberRoot.old.js @@ -15,6 +15,7 @@ import type { } from './ReactInternalTypes'; import type {RootTag} from './ReactRootTags'; import type {Cache} from './ReactFiberCacheComponent.old'; +import type {Container} from './ReactFiberHostConfig'; import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; import {createHostRootFiber} from './ReactFiber.old'; @@ -128,7 +129,7 @@ function FiberRootNode( } export function createFiberRoot( - containerInfo: any, + containerInfo: Container, tag: RootTag, hydrate: boolean, initialChildren: ReactNodeList,