HomePhabricator
Diffusion Comm 2060a293f1d3

[Flow202][web][skip-ci] [15/x] Fix Flow issues in htmlTargetFromEvent

Description

[Flow202][web][skip-ci] [15/x] Fix Flow issues in htmlTargetFromEvent

Summary:
This is a really old utility. We only use it in web/calendar/day.react.js now.

Besides adding some types, I also had to add an invariant. The old code would've crashed in this case anyways (on the other invariant), but the second invariant was necessary for Flow.

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 D9780

Test Plan: Confirm the Flow errors go away

Reviewers: tomek

Reviewed By: tomek

Subscribers: wyilio

Differential Revision: https://phab.comm.dev/D9781

Details

Provenance
ashoatAuthored on Nov 8 2023, 11:00 AM
Reviewer
tomek
Differential Revision
D9781: [Flow202][web][skip-ci] [15/x] Fix Flow issues in htmlTargetFromEvent
Parents
rCOMM362d8fb1c778: [Flow202][web][skip-ci] [14/x] Fix Flow issues in web/database
Branches
Unknown
Tags
Unknown