GeezerVison is showing github.com — changed Transitions type to Array<Transition> (#24249) · react/react@b8cfda1
File treeExpand file treeCollapse file tree Open diff view settings packages/react-reconciler/src
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberLane.new.js +2-5Lines changed: 2 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | */ | 9 | 9 |
| 10 | 10 | import type {FiberRoot} from './ReactInternalTypes'; | 11 | | -import type { | 12 | | - Transition, | 13 | | - Transitions, | 14 | | -} from './ReactFiberTracingMarkerComponent.new'; | | 11 | +import type {Transition} from './ReactFiberTracingMarkerComponent.new'; | 15 | 12 |
| 16 | 13 | // TODO: Ideally these types would be opaque but that doesn't work well with | 17 | 14 | // our reconciler fork infra, since these leak into non-reconciler packages. | @@ -824,7 +821,7 @@ export function addTransitionToLanesMap( | 824 | 821 | export function getTransitionsForLanes( | 825 | 822 | root: FiberRoot, | 826 | 823 | lanes: Lane | Lanes, | 827 | | -): Transitions | null { | | 824 | +): Array<Transition> | null { | 828 | 825 | if (!enableTransitionTracing) { | 829 | 826 | return null; | 830 | 827 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberLane.old.js +2-5Lines changed: 2 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | */ | 9 | 9 |
| 10 | 10 | import type {FiberRoot} from './ReactInternalTypes'; | 11 | | -import type { | 12 | | - Transition, | 13 | | - Transitions, | 14 | | -} from './ReactFiberTracingMarkerComponent.old'; | | 11 | +import type {Transition} from './ReactFiberTracingMarkerComponent.old'; | 15 | 12 |
| 16 | 13 | // TODO: Ideally these types would be opaque but that doesn't work well with | 17 | 14 | // our reconciler fork infra, since these leak into non-reconciler packages. | @@ -824,7 +821,7 @@ export function addTransitionToLanesMap( | 824 | 821 | export function getTransitionsForLanes( | 825 | 822 | root: FiberRoot, | 826 | 823 | lanes: Lane | Lanes, | 827 | | -): Transitions | null { | | 824 | +): Array<Transition> | null { | 828 | 825 | if (!enableTransitionTracing) { | 829 | 826 | return null; | 830 | 827 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberRoot.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import type { | 15 | 15 | } from './ReactInternalTypes'; | 16 | 16 | import type {RootTag} from './ReactRootTags'; | 17 | 17 | import type {Cache} from './ReactFiberCacheComponent.new'; | 18 | | -import type {Transitions} from './ReactFiberTracingMarkerComponent.new'; | | 18 | +import type {Transition} from './ReactFiberTracingMarkerComponent.new'; | 19 | 19 |
| 20 | 20 | import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; | 21 | 21 | import {createHostRootFiber} from './ReactFiber.new'; | @@ -42,7 +42,7 @@ export type RootState = { | 42 | 42 | element: any, | 43 | 43 | isDehydrated: boolean, | 44 | 44 | cache: Cache, | 45 | | - transitions: Transitions | null, | | 45 | + transitions: Array<Transition> | null, | 46 | 46 | }; | 47 | 47 |
| 48 | 48 | function FiberRootNode( | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberRoot.old.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import type { | 15 | 15 | } from './ReactInternalTypes'; | 16 | 16 | import type {RootTag} from './ReactRootTags'; | 17 | 17 | import type {Cache} from './ReactFiberCacheComponent.old'; | 18 | | -import type {Transitions} from './ReactFiberTracingMarkerComponent.old'; | | 18 | +import type {Transition} from './ReactFiberTracingMarkerComponent.old'; | 19 | 19 |
| 20 | 20 | import {noTimeout, supportsHydration} from './ReactFiberHostConfig'; | 21 | 21 | import {createHostRootFiber} from './ReactFiber.old'; | @@ -42,7 +42,7 @@ export type RootState = { | 42 | 42 | element: any, | 43 | 43 | isDehydrated: boolean, | 44 | 44 | cache: Cache, | 45 | | - transitions: Transitions | null, | | 45 | + transitions: Array<Transition> | null, | 46 | 46 | }; | 47 | 47 |
| 48 | 48 | function FiberRootNode( | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberTracingMarkerComponent.new.js -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -34,8 +34,6 @@ export type BatchConfigTransition = { | 34 | 34 | _updatedFibers?: Set<Fiber>, | 35 | 35 | }; | 36 | 36 |
| 37 | | -export type Transitions = Array<Transition> | null; | 38 | | - | 39 | 37 | export type TransitionCallback = 0 | 1; | 40 | 38 |
| 41 | 39 | export const TransitionStart = 0; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberTracingMarkerComponent.old.js -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -34,8 +34,6 @@ export type BatchConfigTransition = { | 34 | 34 | _updatedFibers?: Set<Fiber>, | 35 | 35 | }; | 36 | 36 |
| 37 | | -export type Transitions = Array<Transition> | null; | 38 | | - | 39 | 37 | export type TransitionCallback = 0 | 1; | 40 | 38 |
| 41 | 39 | export const TransitionStart = 0; | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import type {EventPriority} from './ReactEventPriorities.new'; | 18 | 18 | import type { | 19 | 19 | PendingTransitionCallbacks, | 20 | 20 | TransitionObject, | 21 | | - Transitions, | | 21 | + Transition, | 22 | 22 | } from './ReactFiberTracingMarkerComponent.new'; | 23 | 23 |
| 24 | 24 | import { | @@ -325,7 +325,7 @@ let workInProgressRootRenderTargetTime: number = Infinity; | 325 | 325 | // suspense heuristics and opt out of rendering more content. | 326 | 326 | const RENDER_TIMEOUT_MS = 500; | 327 | 327 |
| 328 | | -let workInProgressTransitions: Transitions | null = null; | | 328 | +let workInProgressTransitions: Array<Transition> | null = null; | 329 | 329 | export function getWorkInProgressTransitions() { | 330 | 330 | return workInProgressTransitions; | 331 | 331 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.old.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ import type {EventPriority} from './ReactEventPriorities.old'; | 18 | 18 | import type { | 19 | 19 | PendingTransitionCallbacks, | 20 | 20 | TransitionObject, | 21 | | - Transitions, | | 21 | + Transition, | 22 | 22 | } from './ReactFiberTracingMarkerComponent.old'; | 23 | 23 |
| 24 | 24 | import { | @@ -325,7 +325,7 @@ let workInProgressRootRenderTargetTime: number = Infinity; | 325 | 325 | // suspense heuristics and opt out of rendering more content. | 326 | 326 | const RENDER_TIMEOUT_MS = 500; | 327 | 327 |
| 328 | | -let workInProgressTransitions: Transitions | null = null; | | 328 | +let workInProgressTransitions: Array<Transition> | null = null; | 329 | 329 | export function getWorkInProgressTransitions() { | 330 | 330 | return workInProgressTransitions; | 331 | 331 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactInternalTypes.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,7 +26,7 @@ import type {Lane, Lanes, LaneMap} from './ReactFiberLane.old'; | 26 | 26 | import type {RootTag} from './ReactRootTags'; | 27 | 27 | import type {TimeoutHandle, NoTimeout} from './ReactFiberHostConfig'; | 28 | 28 | import type {Cache} from './ReactFiberCacheComponent.old'; | 29 | | -import type {Transitions} from './ReactFiberTracingMarkerComponent.new'; | | 29 | +import type {Transition} from './ReactFiberTracingMarkerComponent.new'; | 30 | 30 |
| 31 | 31 | // Unwind Circular: moved from ReactFiberHooks.old | 32 | 32 | export type HookType = | @@ -320,7 +320,7 @@ export type TransitionTracingCallbacks = { | 320 | 320 | // The following fields are only used in transition tracing in Profile builds | 321 | 321 | type TransitionTracingOnlyFiberRootProperties = {| | 322 | 322 | transitionCallbacks: null | TransitionTracingCallbacks, | 323 | | - transitionLanes: Array<Transitions>, | | 323 | + transitionLanes: Array<Array<Transition> | null>, | 324 | 324 | |}; | 325 | 325 |
| 326 | 326 | // Exported FiberRoot type includes all properties, | |
|