Page MenuHomePhabricator

[Flow202][native][skip-ci] [26/x] Fix Flow issues with types of variables that get mutated
ClosedPublic

Authored by ashoat on Nov 27 2023, 12:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 7:17 AM
Unknown Object (File)
Oct 17 2024, 11:12 AM
Unknown Object (File)
Oct 17 2024, 11:12 AM
Unknown Object (File)
Oct 17 2024, 11:11 AM
Unknown Object (File)
Oct 17 2024, 11:11 AM
Unknown Object (File)
Sep 22 2024, 5:48 PM
Unknown Object (File)
Sep 6 2024, 3:26 AM
Unknown Object (File)
Sep 6 2024, 3:26 AM
Subscribers

Details

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:

  1. let declarations where the variable is reassigned later
  2. 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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable