Skip to content

Commit 5829f0b

Browse files
committed
merging is hard
1 parent dc1e4bc commit 5829f0b

File tree

13 files changed

+41
-41
lines changed

13 files changed

+41
-41
lines changed

packages/react-debug-tools/src/ReactDebugHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function getCacheForType<T>(resourceType: () => T): T {
105105
throw new Error('Not implemented.');
106106
}
107107

108-
function readContext<T: any>(context: ReactContext<T>): T {
108+
function readContext<T>(context: ReactContext<T>): T {
109109
// For now we don't expose readContext usage in the hooks debugging info.
110110
return context._currentValue;
111111
}

packages/react-devtools-shared/src/backend/types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export type GetFiberIDForNative = (
8383
) => number | null;
8484
export type FindNativeNodesForFiberID = (id: number) => ?Array<NativeType>;
8585

86-
export type ReactProviderType<T: any> = {
86+
export type ReactProviderType<T> = {
8787
$$typeof: Symbol | number,
8888
_context: ReactContext<T>,
8989
...

packages/react-dom/src/server/ReactPartialRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ class ReactDOMServerRenderer {
833833
* https://github.com/facebook/react/pull/12985#issuecomment-396301248
834834
*/
835835

836-
pushProvider<T: any>(provider: ReactProvider<T>): void {
836+
pushProvider<T>(provider: ReactProvider<T>): void {
837837
const index = ++this.contextIndex;
838838
const context: ReactContext<any> = provider.type._context;
839839
const threadID = this.threadID;

packages/react-dom/src/server/ReactPartialRendererHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function getCacheForType<T>(resourceType: () => T): T {
222222
throw new Error('Not implemented.');
223223
}
224224

225-
function readContext<T: any>(context: ReactContext<T>): T {
225+
function readContext<T>(context: ReactContext<T>): T {
226226
const threadID = currentPartialRenderer.threadID;
227227
validateContextBounds(context, threadID);
228228
if (__DEV__) {

packages/react-reconciler/src/ReactFiberHooks.new.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ if (__DEV__) {
25352535
};
25362536

25372537
HooksDispatcherOnMountInDEV = {
2538-
readContext<T: any>(context: ReactContext<T>): T {
2538+
readContext<T>(context: ReactContext<T>): T {
25392539
return readContext(context);
25402540
},
25412541
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2683,7 +2683,7 @@ if (__DEV__) {
26832683
}
26842684

26852685
HooksDispatcherOnMountWithHookTypesInDEV = {
2686-
readContext<T: any>(context: ReactContext<T>): T {
2686+
readContext<T>(context: ReactContext<T>): T {
26872687
return readContext(context);
26882688
},
26892689
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2825,7 +2825,7 @@ if (__DEV__) {
28252825
}
28262826

28272827
HooksDispatcherOnUpdateInDEV = {
2828-
readContext<T: any>(context: ReactContext<T>): T {
2828+
readContext<T>(context: ReactContext<T>): T {
28292829
return readContext(context);
28302830
},
28312831
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2967,7 +2967,7 @@ if (__DEV__) {
29672967
}
29682968

29692969
HooksDispatcherOnRerenderInDEV = {
2970-
readContext<T: any>(context: ReactContext<T>): T {
2970+
readContext<T>(context: ReactContext<T>): T {
29712971
return readContext(context);
29722972
},
29732973

@@ -3110,7 +3110,7 @@ if (__DEV__) {
31103110
}
31113111

31123112
InvalidNestedHooksDispatcherOnMountInDEV = {
3113-
readContext<T: any>(context: ReactContext<T>): T {
3113+
readContext<T>(context: ReactContext<T>): T {
31143114
warnInvalidContextAccess();
31153115
return readContext(context);
31163116
},
@@ -3269,7 +3269,7 @@ if (__DEV__) {
32693269
}
32703270

32713271
InvalidNestedHooksDispatcherOnUpdateInDEV = {
3272-
readContext<T: any>(context: ReactContext<T>): T {
3272+
readContext<T>(context: ReactContext<T>): T {
32733273
warnInvalidContextAccess();
32743274
return readContext(context);
32753275
},
@@ -3428,7 +3428,7 @@ if (__DEV__) {
34283428
}
34293429

34303430
InvalidNestedHooksDispatcherOnRerenderInDEV = {
3431-
readContext<T: any>(context: ReactContext<T>): T {
3431+
readContext<T>(context: ReactContext<T>): T {
34323432
warnInvalidContextAccess();
34333433
return readContext(context);
34343434
},

packages/react-reconciler/src/ReactFiberHooks.old.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ if (__DEV__) {
25352535
};
25362536

25372537
HooksDispatcherOnMountInDEV = {
2538-
readContext<T: any>(context: ReactContext<T>): T {
2538+
readContext<T>(context: ReactContext<T>): T {
25392539
return readContext(context);
25402540
},
25412541
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2683,7 +2683,7 @@ if (__DEV__) {
26832683
}
26842684

26852685
HooksDispatcherOnMountWithHookTypesInDEV = {
2686-
readContext<T: any>(context: ReactContext<T>): T {
2686+
readContext<T>(context: ReactContext<T>): T {
26872687
return readContext(context);
26882688
},
26892689
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2825,7 +2825,7 @@ if (__DEV__) {
28252825
}
28262826

28272827
HooksDispatcherOnUpdateInDEV = {
2828-
readContext<T: any>(context: ReactContext<T>): T {
2828+
readContext<T>(context: ReactContext<T>): T {
28292829
return readContext(context);
28302830
},
28312831
useCallback<T>(callback: T, deps: Array<mixed> | void | null): T {
@@ -2967,7 +2967,7 @@ if (__DEV__) {
29672967
}
29682968

29692969
HooksDispatcherOnRerenderInDEV = {
2970-
readContext<T: any>(context: ReactContext<T>): T {
2970+
readContext<T>(context: ReactContext<T>): T {
29712971
return readContext(context);
29722972
},
29732973

@@ -3110,7 +3110,7 @@ if (__DEV__) {
31103110
}
31113111

31123112
InvalidNestedHooksDispatcherOnMountInDEV = {
3113-
readContext<T: any>(context: ReactContext<T>): T {
3113+
readContext<T>(context: ReactContext<T>): T {
31143114
warnInvalidContextAccess();
31153115
return readContext(context);
31163116
},
@@ -3269,7 +3269,7 @@ if (__DEV__) {
32693269
}
32703270

32713271
InvalidNestedHooksDispatcherOnUpdateInDEV = {
3272-
readContext<T: any>(context: ReactContext<T>): T {
3272+
readContext<T>(context: ReactContext<T>): T {
32733273
warnInvalidContextAccess();
32743274
return readContext(context);
32753275
},
@@ -3428,7 +3428,7 @@ if (__DEV__) {
34283428
}
34293429

34303430
InvalidNestedHooksDispatcherOnRerenderInDEV = {
3431-
readContext<T: any>(context: ReactContext<T>): T {
3431+
readContext<T>(context: ReactContext<T>): T {
34323432
warnInvalidContextAccess();
34333433
return readContext(context);
34343434
},

packages/react-reconciler/src/ReactFiberNewContext.new.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function exitDisallowedContextReadInDEV(): void {
8585
}
8686
}
8787

88-
export function pushProvider<T: any>(
88+
export function pushProvider<T>(
8989
providerFiber: Fiber,
9090
context: ReactContext<T>,
9191
nextValue: T,
@@ -196,7 +196,7 @@ export function scheduleContextWorkOnParentPath(
196196
}
197197
}
198198

199-
export function propagateContextChange<T: any>(
199+
export function propagateContextChange<T>(
200200
workInProgress: Fiber,
201201
context: ReactContext<T>,
202202
renderLanes: Lanes,
@@ -217,7 +217,7 @@ export function propagateContextChange<T: any>(
217217
}
218218
}
219219

220-
function propagateContextChange_eager<T: any>(
220+
function propagateContextChange_eager<T>(
221221
workInProgress: Fiber,
222222
context: ReactContext<T>,
223223
renderLanes: Lanes,
@@ -357,7 +357,7 @@ function propagateContextChange_eager<T: any>(
357357
}
358358
}
359359

360-
function propagateContextChanges<T: any>(
360+
function propagateContextChanges<T>(
361361
workInProgress: Fiber,
362362
contexts: Array<any>,
363363
renderLanes: Lanes,
@@ -656,7 +656,7 @@ export function prepareToReadContext(
656656
}
657657
}
658658

659-
export function readContext<T: any>(context: ReactContext<T>): T {
659+
export function readContext<T>(context: ReactContext<T>): T {
660660
if (__DEV__) {
661661
// This warning would fire if you read context inside a Hook like useMemo.
662662
// Unlike the class check below, it's not enforced in production for perf.

packages/react-reconciler/src/ReactFiberNewContext.old.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function exitDisallowedContextReadInDEV(): void {
8585
}
8686
}
8787

88-
export function pushProvider<T: any>(
88+
export function pushProvider<T>(
8989
providerFiber: Fiber,
9090
context: ReactContext<T>,
9191
nextValue: T,
@@ -196,7 +196,7 @@ export function scheduleContextWorkOnParentPath(
196196
}
197197
}
198198

199-
export function propagateContextChange<T: any>(
199+
export function propagateContextChange<T>(
200200
workInProgress: Fiber,
201201
context: ReactContext<T>,
202202
renderLanes: Lanes,
@@ -217,7 +217,7 @@ export function propagateContextChange<T: any>(
217217
}
218218
}
219219

220-
function propagateContextChange_eager<T: any>(
220+
function propagateContextChange_eager<T>(
221221
workInProgress: Fiber,
222222
context: ReactContext<T>,
223223
renderLanes: Lanes,
@@ -357,7 +357,7 @@ function propagateContextChange_eager<T: any>(
357357
}
358358
}
359359

360-
function propagateContextChanges<T: any>(
360+
function propagateContextChanges<T>(
361361
workInProgress: Fiber,
362362
contexts: Array<any>,
363363
renderLanes: Lanes,
@@ -656,7 +656,7 @@ export function prepareToReadContext(
656656
}
657657
}
658658

659-
export function readContext<T: any>(context: ReactContext<T>): T {
659+
export function readContext<T>(context: ReactContext<T>): T {
660660
if (__DEV__) {
661661
// This warning would fire if you read context inside a Hook like useMemo.
662662
// Unlike the class check below, it's not enforced in production for perf.

packages/react-reconciler/src/ReactFiberScope.new.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function collectFirstScopedNodeFromChildren(
108108
return null;
109109
}
110110

111-
function collectNearestContextValues<T: any>(
111+
function collectNearestContextValues<T>(
112112
node: Fiber,
113113
context: ReactContext<T>,
114114
childContextValues: Array<T>,
@@ -128,7 +128,7 @@ function collectNearestContextValues<T: any>(
128128
}
129129
}
130130

131-
function collectNearestChildContextValues<T: any>(
131+
function collectNearestChildContextValues<T>(
132132
startingChild: Fiber | null,
133133
context: ReactContext<T>,
134134
childContextValues: Array<T>,
@@ -176,7 +176,7 @@ function containsNode(node: Object): boolean {
176176
return false;
177177
}
178178

179-
function getChildContextValues<T: any>(context: ReactContext<T>): Array<T> {
179+
function getChildContextValues<T>(context: ReactContext<T>): Array<T> {
180180
const currentFiber = getInstanceFromScope(this);
181181
if (currentFiber === null) {
182182
return [];

packages/react-reconciler/src/ReactFiberScope.old.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function collectFirstScopedNodeFromChildren(
108108
return null;
109109
}
110110

111-
function collectNearestContextValues<T: any>(
111+
function collectNearestContextValues<T>(
112112
node: Fiber,
113113
context: ReactContext<T>,
114114
childContextValues: Array<T>,
@@ -128,7 +128,7 @@ function collectNearestContextValues<T: any>(
128128
}
129129
}
130130

131-
function collectNearestChildContextValues<T: any>(
131+
function collectNearestChildContextValues<T>(
132132
startingChild: Fiber | null,
133133
context: ReactContext<T>,
134134
childContextValues: Array<T>,
@@ -176,7 +176,7 @@ function containsNode(node: Object): boolean {
176176
return false;
177177
}
178178

179-
function getChildContextValues<T: any>(context: ReactContext<T>): Array<T> {
179+
function getChildContextValues<T>(context: ReactContext<T>): Array<T> {
180180
const currentFiber = getInstanceFromScope(this);
181181
if (currentFiber === null) {
182182
return [];

0 commit comments

Comments
 (0)