Page MenuHomePhabricator

[Flow202][native][skip-ci] [4/x] Stop copy-pasting between ReactNav libdefs
ClosedPublic

Authored by ashoat on Nov 27 2023, 12:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 3:32 AM
Unknown Object (File)
Mon, Dec 16, 6:09 AM
Unknown Object (File)
Mon, Dec 16, 6:09 AM
Unknown Object (File)
Mon, Dec 16, 6:08 AM
Unknown Object (File)
Mon, Dec 16, 6:00 AM
Unknown Object (File)
Mon, Dec 9, 1:03 AM
Unknown Object (File)
Sun, Dec 8, 5:32 PM
Unknown Object (File)
Nov 8 2024, 2:07 AM
Subscribers
None

Details

Summary

In the past flow-typed did not allow importing from other libdefs, so we needed to copy-paste between React Navigation libdefs. This has been challenging because Flow is not always able to realize that the types match up. The new version of Flow was seeing a lot more errors due to issues matching up the copy-pasted types.

In this diff, we eliminate all copy-paste between these libdefs, opting instead to import from the @react-navigation/core libdef. This means that all types must now be sourced from @react-navigation/core, which necessitated some additional export declarations there, and a whole lot of changes to imports.

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 D9987

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable