[Flow202][native][skip-ci] [26/x] Fix Flow issues with types of variables that get mutated
Summary:
This the native counterpart of D9774 (web), D9706 / D9692 (lib), and D9858 (keyserver).
There are two main categories of changes here, and both pertain to variables getting mutated:
- let declarations where the variable is reassigned later
- const declarations of mutable collections that are mutated later
In both of these cases, Flow now wants us to annotate the declaration to cover both the type of the data that's initialized, and also the mutations that later occur.
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 o
f 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 D10009
Test Plan: Confirm the Flow errors go away
Reviewers: atul
Reviewed By: atul
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D10010