-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow][enums] Update
isValid
Flow Enums method to use type guard
Summary: Changelog: [feature] Updated the `isValid` Flow Enums method to use a type guard, allowing it to refine its input to the enum type in a conditional context. E.g. ``` enum Status {Active, Off} const s = "Active"; if (Status.isValid(s)) { s as Status; // Should work } ``` Reviewed By: panagosg7 Differential Revision: D54834841 fbshipit-source-id: 075eecd5da2ae00640a246be21818db16e470347
- Loading branch information
1 parent
1a32689
commit 6355cf9
Showing
5 changed files
with
56 additions
and
46 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
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
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