Flow is worried about these variables being reassigned between await invocations.
I had three options:
- Assign them to local const variables to guarantee that they aren't reassigned. This is what I opted to do. However, note that this may lead to some changes in behavior, particularly if the code here relied on getting the "latest" value assigned to the variable, rather than using the value that was there at the start of the invocation.
- Add invariants. This would make sense if we always want to use the "latest" value AND we're sure that it will never be unset after the first time it's set.
- Add checks / error handling if the variable is not set at the time it's called. This would probably be the safest thing to do, but should only be necessary if we want to use the "latest" value AND there's a possibility of the variable being unset after the first time it's set.
NOTE: CI will fail on this diff. I considered the possibility of fixing Flow errors BEFORE upgrading Flow, but it wasn't possible... in some cases, the fixes to support the new version of Flow caused errors in the old version. I could have hidden these type errors with $FlowFixMe lines and then later revert those, but that seemed like too much busy work.
Depends on D9779