-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete missing Flow declarations in URL #32566
Conversation
Base commit: 36bbd8f |
@mischnic It looks like this was also called out in the original PR: https://github.com/facebook/react-native/pull/22901/files#r246114640 but I guess if flow passes here then it's not an issue? |
@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Base commit: 36bbd8f |
fe79a27
to
4dbd4d5
Compare
Flow declarations without Up until now I didn't actually test if Flow passed with my changes, so now I've:
|
@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@@ -17,8 +17,8 @@ const originalRCTWebSocketSend = NativeWebSocketModule.send; | |||
const originalRCTWebSocketSendBinary = NativeWebSocketModule.sendBinary; | |||
const originalRCTWebSocketClose = NativeWebSocketModule.close; | |||
|
|||
let eventEmitter: NativeEventEmitter; | |||
let subscriptions: Array<EventSubscription>; | |||
let eventEmitter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was @flow
removed from your last commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we leave this file untouched -- I realize the types could be dead but I'd prefer we do this in a separate PR so the intent is clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a separate PR
Done #32570
@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@lunaleaps merged this pull request in 98abf1b. |
Summary: See #32566 This file doesn't have a `flow` comment, and the types that I removed here are incorrect anyway (missing a generic type parameter) because Flow didn't check them. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Remove unused and incorrect type declarations in WebSocketInterceptor Pull Request resolved: #32570 Test Plan: See #32566 Reviewed By: lunaleaps Differential Revision: D32315077 Pulled By: GijsWeterings fbshipit-source-id: d3b826a01a0bb8e38380de5b79cb6b5d13db2ef1
Summary
When transpiling flow with a Babel config like
all files containing Flow syntax need to have
@flow
at the top of the file.In URL, it was removed (mistakenly I think) by 6303850#diff-552f9731d5c9bc329105a5f4224319966395e59b5bb23202b756c5d152e0f007. Only the `strict-local´ part should have been removed, not the whole line.
Changelog
[General] [Fixed] - Complete missing Flow declarations in URL
Test Plan
See above