mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Pre-suppress unsafe string key access errors in xplat/js (#44221)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44221 This diff pre-suppresses errors of the following pattern, to prepare for the next Flow release. ``` declare const obj: {foo: string}; declare const key: string; obj[key]; // error: invalid-computed-prop ``` Changelog: [Internal] Reviewed By: alexmckenley Differential Revision: D56477899 fbshipit-source-id: 5676b8685bd3157a519fe433cfce0fa28e003502
This commit is contained in:
1 parent
4928f44f70
commit
41f525ccae
22 files changed
+47
-7
No files matched your search
+1
@@ -39,6 +39,7 @@ function generateSupportedApplePlatformsMacro(
|
||||
const compilerMacroString = Object.keys(supportedPlatformsMap)
|
||||
.reduce((acc: string[], platform) => {
|
||||
if (!supportedPlatformsMap[platform]) {
|
||||
// $FlowFixMe[invalid-computed-prop]
|
||||
return [...acc, `!${APPLE_PLATFORMS_MACRO_MAP[platform]}`];
|
||||
}
|
||||
return acc;
|
||||
|
||||
Reference in new issue
Block a user