Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow: add some missing types in react-reconciler #25316

Merged
merged 1 commit into from
Sep 23, 2022
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
12 changes: 6 additions & 6 deletions packages/react-reconciler/src/ReactFiber.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export function createFiberFromSuspense(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(SuspenseComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_TYPE;
fiber.lanes = lanes;
Expand All @@ -705,7 +705,7 @@ export function createFiberFromSuspenseList(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
fiber.lanes = lanes;
Expand All @@ -717,7 +717,7 @@ export function createFiberFromOffscreen(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
Expand All @@ -736,7 +736,7 @@ export function createFiberFromLegacyHidden(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode);
fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
fiber.lanes = lanes;
Expand All @@ -757,7 +757,7 @@ export function createFiberFromCache(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(CacheComponent, pendingProps, key, mode);
fiber.elementType = REACT_CACHE_TYPE;
fiber.lanes = lanes;
Expand All @@ -769,7 +769,7 @@ export function createFiberFromTracingMarker(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(TracingMarkerComponent, pendingProps, key, mode);
fiber.elementType = REACT_TRACING_MARKER_TYPE;
fiber.lanes = lanes;
Expand Down
12 changes: 6 additions & 6 deletions packages/react-reconciler/src/ReactFiber.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export function createFiberFromSuspense(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(SuspenseComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_TYPE;
fiber.lanes = lanes;
Expand All @@ -705,7 +705,7 @@ export function createFiberFromSuspenseList(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
fiber.lanes = lanes;
Expand All @@ -717,7 +717,7 @@ export function createFiberFromOffscreen(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
Expand All @@ -736,7 +736,7 @@ export function createFiberFromLegacyHidden(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode);
fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
fiber.lanes = lanes;
Expand All @@ -757,7 +757,7 @@ export function createFiberFromCache(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(CacheComponent, pendingProps, key, mode);
fiber.elementType = REACT_CACHE_TYPE;
fiber.lanes = lanes;
Expand All @@ -769,7 +769,7 @@ export function createFiberFromTracingMarker(
mode: TypeOfMode,
lanes: Lanes,
key: null | string,
) {
): Fiber {
const fiber = createFiber(TracingMarkerComponent, pendingProps, key, mode);
fiber.elementType = REACT_TRACING_MARKER_TYPE;
fiber.lanes = lanes;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberAct.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function isLegacyActEnvironment(fiber: Fiber): boolean {
return false;
}

export function isConcurrentActEnvironment() {
export function isConcurrentActEnvironment(): void | boolean {
if (__DEV__) {
const isReactActEnvironmentGlobal =
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberAct.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function isLegacyActEnvironment(fiber: Fiber): boolean {
return false;
}

export function isConcurrentActEnvironment() {
export function isConcurrentActEnvironment(): void | boolean {
if (__DEV__) {
const isReactActEnvironmentGlobal =
// $FlowFixMe – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
Expand Down