-
-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MessageList: Fix type-checking of props.
This is the problem we've run into a few times [1] [2] where adding `() => <C />;` to the file magically causes C's callers even *outside* the file to start getting their props type-checked, where they weren't before. Instead of doing that, annotate the export with `ComponentType<OuterProps>`, which Greg noticed also worked [3], since we happen to have `OuterProps` lying around anyway. [1] fcde700 [2] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Flow.20and.20.60connect.60/near/1098203 [3] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Flow.20and.20.60connect.60/near/1098230
- Loading branch information
1 parent
3d1dd5a
commit 31feae8
Showing
2 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters