Page MenuHomePhabricator

[Flow202][keyserver][skip-ci] [24/x] Address missing-local-annot type errors
ClosedPublic

Authored by ashoat on Nov 13 2023, 3:26 PM.
Tags
None
Referenced Files
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: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)
Sun, Dec 15, 12:56 AM
Unknown Object (File)
Fri, Dec 6, 10:56 AM
Subscribers
None

Details

Summary

The new version of Flow wants more annotations for function and member definitions. This diff adds all of the required annotations to the keyserver codebase necessary to clear all missing-local-annot errors. This is the keyserver equivalent of D9771 (web) and D9697 (lib).

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 D9872

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 13 2023, 3:46 PM
Harbormaster failed remote builds in B24090: Diff 33189!
tomek added inline comments.
keyserver/src/socket/socket.js
827 ↗(On Diff #33189)

Depending on how often we use it, we can consider introducing a generic type for debounce to our utils

This revision is now accepted and ready to land.Nov 14 2023, 8:54 AM
keyserver/src/socket/socket.js
827 ↗(On Diff #33189)

While we import it from four files, this is the only file we'll need to type it this way (including { +cancel: () => void }). There's one other place we use cancel, but it's from a React functional component, and Flow is able to deduce the type correctly from our lodash libdef

ashoat retitled this revision from [Flow202][keyserver] [24/x] Address missing-local-annot type errors to [Flow202][keyserver][skip-ci] [24/x] Address missing-local-annot type errors.Nov 19 2023, 5:11 PM