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)
Tue, May 7, 12:54 AM
Unknown Object (File)
Wed, May 1, 11:31 PM
Unknown Object (File)
Wed, May 1, 11:17 PM
Unknown Object (File)
Wed, Apr 24, 5:27 AM
Unknown Object (File)
Mon, Apr 15, 8:45 PM
Unknown Object (File)
Mon, Apr 15, 4:04 PM
Unknown Object (File)
Mon, Apr 15, 3:35 AM
Unknown Object (File)
Sun, Apr 14, 4:11 PM
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