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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
"fbjs-scripts": "^3.0.1",
"filesize": "^6.0.1",
"flow-bin": "^0.266",
"flow-remove-types": "^2.266",
"flow-bin": "^0.267",
"flow-remove-types": "^2.267",
"flow-typed": "^4.1.1",
"glob": "^7.1.6",
"glob-stream": "^6.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-shared/src/backend/fiber/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1317,9 +1317,9 @@ export function attach(
if (componentLogsEntry === undefined) {
componentLogsEntry = {
errors: new Map(),
errorsCount: 0,
errorsCount: 0 as number,
warnings: new Map(),
warningsCount: 0,
warningsCount: 0 as number,
};
fiberToComponentLogsMap.set(fiber, componentLogsEntry);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-shared/src/backend/flight/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ export function attach(
if (componentLogsEntry === undefined) {
componentLogsEntry = {
errors: new Map(),
errorsCount: 0,
errorsCount: 0 as number,
warnings: new Map(),
warningsCount: 0,
warningsCount: 0 as number,
};
componentInfoToComponentLogsMap.set(componentInfo, componentLogsEntry);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-reconciler/src/ReactFiberApplyGesture.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ function recursivelyInsertNewFiber(
const viewTransitionState: ViewTransitionState = finishedWork.stateNode;
// TODO: If this was already cloned by a previous pass we can reuse those clones.
viewTransitionState.clones = null;
let nextPhase;
let nextPhase: VisitPhase;
if (visitPhase === INSERT_EXIT) {
// This was an Enter of a ViewTransition. We now move onto inserting the inner
// HostComponents and finding inner pairs.
Expand Down Expand Up @@ -637,7 +637,7 @@ function recursivelyInsertClonesFromExistingTree(
// So we need it to be cleared before we do that.
// TODO: Use some other temporary state to track this.
child.flags &= ~Update;
let nextPhase;
let nextPhase: VisitPhase;
if (visitPhase === CLONE_EXIT) {
// This was an Enter of a ViewTransition. We now move onto unhiding the inner
// HostComponents and finding inner pairs.
Expand Down Expand Up @@ -894,7 +894,7 @@ function insertDestinationClonesOfFiber(
// Only insert clones if this tree is going to be visible. No need to
// clone invisible content.
// TODO: If this is visible but detached it should still be cloned.
let nextPhase;
let nextPhase: VisitPhase;
if (visitPhase === CLONE_UPDATE && (flags & Visibility) !== NoFlags) {
// This is the root of an appear. We need to trigger Enter transitions.
nextPhase = CLONE_EXIT;
Expand Down Expand Up @@ -922,7 +922,7 @@ function insertDestinationClonesOfFiber(
const viewTransitionState: ViewTransitionState = finishedWork.stateNode;
// TODO: If this was already cloned by a previous pass we can reuse those clones.
viewTransitionState.clones = null;
let nextPhase;
let nextPhase: VisitPhase;
if (visitPhase === CLONE_EXIT) {
// This was an Enter of a ViewTransition. We now move onto unhiding the inner
// HostComponents and finding inner pairs.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberCacheComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AbortControllerLocal: typeof AbortController =
function AbortControllerShim() {
const listeners = [];
const signal = (this.signal = {
aborted: false,
aborted: false as boolean,
addEventListener: (type, listener) => {
listeners.push(listener);
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ function useMemoCache(size: number): Array<mixed> {
? currentMemoCache.data
: // Clone the memo cache before each render (copy-on-write)
currentMemoCache.data.map(array => array.slice()),
index: 0,
index: 0 as number,
};
}
}
Expand All @@ -1218,7 +1218,7 @@ function useMemoCache(size: number): Array<mixed> {
if (memoCache == null) {
memoCache = {
data: [],
index: 0,
index: 0 as number,
};
}
if (updateQueue === null) {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ export function performWorkOnRoot(
// even for regular pings.
checkIfRootIsPrerendering(root, lanes);

let exitStatus = shouldTimeSlice
let exitStatus: RootExitStatus = shouldTimeSlice
? renderRootConcurrent(root, lanes)
: renderRootSync(root, lanes, true);

Expand Down Expand Up @@ -1212,7 +1212,7 @@ function recoverFromConcurrentError(
root: FiberRoot,
originallyAttemptedLanes: Lanes,
errorRetryLanes: Lanes,
) {
): RootExitStatus {
// If an error occurred during hydration, discard server response and fall
// back to client side render.

Expand Down Expand Up @@ -2520,7 +2520,7 @@ function workLoopSync() {
}
}

function renderRootConcurrent(root: FiberRoot, lanes: Lanes) {
function renderRootConcurrent(root: FiberRoot, lanes: Lanes): RootExitStatus {
const prevExecutionContext = executionContext;
executionContext |= RenderContext;
const prevDispatcher = pushDispatcher(root.containerInfo);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server/src/ReactFlightReplyServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ function createModelResolver<T>(
}
} else {
blocked = initializingChunkBlockedModel = {
deps: cyclic ? 0 : 1,
deps: (cyclic ? 0 : 1) as number,
value: (null: any),
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/forks/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function unstable_runWithPriority<T>(
}

function unstable_next<T>(eventHandler: () => T): T {
var priorityLevel;
var priorityLevel: PriorityLevel;
switch (currentPriorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/forks/SchedulerMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function unstable_runWithPriority<T>(
}

function unstable_next<T>(eventHandler: () => T): T {
var priorityLevel;
var priorityLevel: PriorityLevel;
switch (currentPriorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/forks/SchedulerPostTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function unstable_getCurrentPriorityLevel(): PriorityLevel {
}

export function unstable_next<T>(callback: () => T): T {
let priorityLevel;
let priorityLevel: PriorityLevel;
switch (currentPriorityLevel_DEPRECATED) {
case ImmediatePriority:
case UserBlockingPriority:
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/ReactPerformanceTrackProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const COMPLEX_ARRAY = 1;
const PRIMITIVE_ARRAY = 2; // Primitive values only
const ENTRIES_ARRAY = 3; // Tuple arrays of string and value (like Headers, Map, etc)
function getArrayKind(array: Object): 0 | 1 | 2 | 3 {
let kind = EMPTY_ARRAY;
let kind: 0 | 1 | 2 | 3 = EMPTY_ARRAY;
for (let i = 0; i < array.length; i++) {
const value = array[i];
if (typeof value === 'object' && value !== null) {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9298,12 +9298,12 @@ flatted@^3.2.9:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a"
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==

flow-bin@^0.266:
version "0.266.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.266.1.tgz#8939be6fbd681c4ef8dc4873b22f4b79be76cb0a"
integrity sha512-c1lg1E8SDcuPSkrOeH0JTcNKMZOzXvqX2DuuXJ0amZec15uyuIi8QlGTO3OzYssMT/kwFdo5vviJqSUI/BNFbw==
flow-bin@^0.267:
version "0.267.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.267.0.tgz#a191375df35c768f1afaebfd0e25b06c8ab82a04"
integrity sha512-NsBcxdAqQauzgOaDf960M+eEnjcFS6FeMs93dEpkvQflwMlP4SRMdKQR8p5WzJJh07CXq9iQnxn+JjLN6kaLUw==

flow-remove-types@^2.266:
flow-remove-types@^2.267:
version "2.279.0"
resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.279.0.tgz#3a3388d9158eba0f82c40d80d31d9640b883a3f5"
integrity sha512-bPFloMR/A2b/r/sIsf7Ix0LaMicCJNjwhXc4xEEQVzJCIz5u7C7XDaEOXOiqveKlCYK7DcBNn6R01Cbbc9gsYA==
Expand Down
Loading