Page MenuHomePhabricator

[Flow202][native][skip-ci] [56/x] Use Flow's comment syntax in Reanimated worklets
ClosedPublic

Authored by ashoat on Nov 27 2023, 1:29 AM.
Tags
None
Referenced Files
F3535605: D10040.id33922.diff
Wed, Dec 25, 4:27 PM
Unknown Object (File)
Sun, Dec 22, 7:06 AM
Unknown Object (File)
Sun, Dec 22, 7:06 AM
Unknown Object (File)
Sun, Dec 22, 7:06 AM
Unknown Object (File)
Sun, Dec 22, 7:06 AM
Unknown Object (File)
Sun, Dec 22, 7:05 AM
Unknown Object (File)
Sun, Dec 22, 7:05 AM
Unknown Object (File)
Fri, Dec 6, 1:14 AM
Subscribers
None

Details

Summary

Background here. The new Flow wants types for these functions, but Reanimated's bundler fails to strip them. To get around it, I'm using Flow's comment syntax.

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 D10039

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat created this revision.
This revision is now accepted and ready to land.Nov 27 2023, 7:22 AM

Use Flow's comment syntax: https://flow.org/en/docs/types/comments/

Best of both worlds: keeps the types and doesn't break Reanimated

ashoat retitled this revision from [Flow202][native][skip-ci] [56/x] Add $FlowFixMe to silence errors in Reanimated worklets to [Flow202][native][skip-ci] [56/x] Add Flow's comment syntax in Reanimated worklets.Nov 27 2023, 2:54 PM
ashoat edited the summary of this revision. (Show Details)
ashoat retitled this revision from [Flow202][native][skip-ci] [56/x] Add Flow's comment syntax in Reanimated worklets to [Flow202][native][skip-ci] [56/x] Use Flow's comment syntax in Reanimated worklets.