mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 20:50:09 +00:00
set one_sided_type_guards=true in fbsource (#45107)
Summary: This diff enables: 1. [one-sided type guards](https://flow.org/en/docs/types/type-guards/#one-sided-type-guards) (`implies x is T`), and 2. stricter checking of type guard consistency (see [relevant docs page](https://flow.org/en/docs/types/type-guards/#toc-consistency-checks-of-type-guard-functions)). To prevent many new errors from being introduced this diff also converts some two-sided type guards to [one-sided](https://flow.org/en/docs/types/type-guards/#one-sided-type-guards) ones. Pull Request resolved: https://github.com/facebook/react-native/pull/45107 Updated the flowconfigs and synced flow_runner/codemods since the change has already been applied there: ``` js1 upgrade www-shared -p flow_runner/codemods ``` Changelog: [Internal] Reviewed By: gkz Differential Revision: D58874409 fbshipit-source-id: 959a6773701518a1d6aa35e2ec28fd4ce12d2e75
This commit is contained in:
parent
8a6508c623
commit
f7fe68861a
@ -64,6 +64,8 @@ module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-nat
|
||||
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
|
||||
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
|
||||
|
||||
one_sided_type_guards=true
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
|
Loading…
Reference in New Issue
Block a user