mirror of
https://github.com/facebook/react.git
synced 2026-02-26 02:54:59 +00:00
[compiler] Rename mismatched variable names after type changes (#35883)
Rename `state: Environment` to `env: Environment` in ValidateMemoizedEffectDependencies visitor methods, and `errorState: Environment` to `env: Environment` in ValidatePreservedManualMemoization's validateInferredDep. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35883). * #35888 * #35884 * __->__ #35883
This commit is contained in:
@@ -230,7 +230,7 @@ function validateInferredDep(
|
||||
temporaries: Map<IdentifierId, ManualMemoDependency>,
|
||||
declsWithinMemoBlock: Set<DeclarationId>,
|
||||
validDepsInMemoBlock: Array<ManualMemoDependency>,
|
||||
errorState: Environment,
|
||||
env: Environment,
|
||||
memoLocation: SourceLocation,
|
||||
): void {
|
||||
let normalizedDep: ManualMemoDependency;
|
||||
@@ -280,7 +280,7 @@ function validateInferredDep(
|
||||
errorDiagnostic = merge(errorDiagnostic ?? compareResult, compareResult);
|
||||
}
|
||||
}
|
||||
errorState.recordError(
|
||||
env.recordError(
|
||||
CompilerDiagnostic.create({
|
||||
category: ErrorCategory.PreserveManualMemo,
|
||||
reason: 'Existing memoization could not be preserved',
|
||||
|
||||
Reference in New Issue
Block a user