@office-iss/react-native-win32 0.72.7 → 0.73.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/.flowconfig +15 -4
  2. package/CHANGELOG.json +523 -94
  3. package/CHANGELOG.md +209 -52
  4. package/IntegrationTests/PromiseTest.js +1 -0
  5. package/IntegrationTests/websocket_integration_test_server.js +1 -1
  6. package/Libraries/Animated/Animated.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  8. package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
  9. package/Libraries/Animated/NativeAnimatedHelper.win32.js +16 -12
  10. package/Libraries/Animated/NativeAnimatedModule.js +6 -2
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
  12. package/Libraries/Animated/animations/Animation.js +57 -3
  13. package/Libraries/Animated/animations/DecayAnimation.js +9 -0
  14. package/Libraries/Animated/animations/SpringAnimation.js +8 -0
  15. package/Libraries/Animated/animations/TimingAnimation.js +8 -0
  16. package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
  17. package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
  18. package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
  19. package/Libraries/Animated/createAnimatedComponent.js +1 -0
  20. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  21. package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
  22. package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
  23. package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
  24. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
  25. package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
  26. package/Libraries/Animated/useAnimatedProps.js +9 -10
  27. package/Libraries/AppState/AppState.d.ts +1 -1
  28. package/Libraries/AppState/NativeAppState.js +8 -4
  29. package/Libraries/BatchedBridge/MessageQueue.js +45 -36
  30. package/Libraries/Blob/Blob.js +6 -2
  31. package/Libraries/Blob/BlobManager.js +9 -10
  32. package/Libraries/Blob/BlobRegistry.js +14 -9
  33. package/Libraries/Blob/File.js +1 -1
  34. package/Libraries/Blob/FileReader.js +1 -2
  35. package/Libraries/Components/Button/ButtonWin32.Props.d.ts +1 -1
  36. package/Libraries/Components/Button/ButtonWin32.Props.js.map +1 -1
  37. package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
  38. package/Libraries/Components/Button/ButtonWin32.js +1 -4
  39. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  40. package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
  41. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
  42. package/Libraries/Components/EnterString.win32.d.ts +1 -1
  43. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
  44. package/Libraries/Components/Pressable/Pressable.js +3 -2
  45. package/Libraries/Components/Pressable/Pressable.win32.js +4 -3
  46. package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
  47. package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
  48. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +7 -8
  49. package/Libraries/Components/ScrollView/ScrollView.js +3 -1
  50. package/Libraries/Components/ScrollView/ScrollView.win32.js +3 -1
  51. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
  52. package/Libraries/Components/Switch/Switch.js +1 -0
  53. package/Libraries/Components/Text/TextWin32.d.ts +1 -1
  54. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  55. package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
  56. package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
  57. package/Libraries/Components/TextInput/TextInput.js +62 -10
  58. package/Libraries/Components/TextInput/TextInput.win32.js +953 -206
  59. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
  60. package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
  61. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +9 -1
  62. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +2 -2
  63. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  64. package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
  65. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  66. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
  67. package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
  68. package/Libraries/Components/Touchable/TouchableWin32.d.ts +1 -1
  69. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  70. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
  71. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
  72. package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
  73. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  74. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  75. package/Libraries/Components/View/View.js +46 -32
  76. package/Libraries/Components/View/View.win32.js +37 -6
  77. package/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  78. package/Libraries/Components/View/ViewNativeComponent.js +1 -0
  79. package/Libraries/Components/View/ViewPropTypes.js +18 -3
  80. package/Libraries/Components/View/ViewPropTypes.win32.js +30 -4
  81. package/Libraries/Components/View/ViewWin32.js +3 -2
  82. package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
  83. package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
  84. package/Libraries/Core/ExceptionsManager.js +16 -7
  85. package/Libraries/Core/ExtendedError.js +12 -0
  86. package/Libraries/Core/ReactNativeVersion.js +3 -3
  87. package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
  88. package/Libraries/Core/ReactNativeVersionCheck.win32.js +0 -2
  89. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
  90. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  91. package/Libraries/Core/setUpIntersectionObserver.js +16 -0
  92. package/Libraries/{Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → Core/setUpMutationObserver.js} +6 -2
  93. package/Libraries/Core/setUpPerformance.js +6 -13
  94. package/Libraries/Core/setUpPerformanceObserver.js +16 -0
  95. package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
  96. package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
  97. package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
  98. package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
  99. package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
  100. package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
  101. package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
  102. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
  103. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
  104. package/Libraries/Image/Image.android.js +8 -2
  105. package/Libraries/Image/Image.d.ts +1 -1
  106. package/Libraries/Image/Image.ios.js +4 -1
  107. package/Libraries/Image/Image.win32.js +6 -3
  108. package/Libraries/Image/ImageBackground.js +3 -0
  109. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  110. package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
  111. package/Libraries/Inspector/NetworkOverlay.js +2 -2
  112. package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
  113. package/Libraries/Interaction/PanResponder.js +1 -4
  114. package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
  115. package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
  116. package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
  117. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
  118. package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
  119. package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
  120. package/Libraries/Lists/FlatList.d.ts +2 -1
  121. package/Libraries/Lists/FlatList.js +15 -5
  122. package/Libraries/Lists/SectionList.js +4 -0
  123. package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
  124. package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
  125. package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
  126. package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
  127. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
  128. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  129. package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
  130. package/Libraries/MutationObserver/MutationObserver.js +184 -0
  131. package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
  132. package/Libraries/MutationObserver/MutationRecord.js +82 -0
  133. package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
  134. package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
  135. package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
  136. package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
  137. package/Libraries/NativeComponent/BaseViewConfig.win32.js +33 -0
  138. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -5
  139. package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
  140. package/Libraries/Network/RCTNetworking.android.js +2 -1
  141. package/Libraries/Network/XMLHttpRequest.js +1 -1
  142. package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
  143. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
  144. package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
  145. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
  146. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
  147. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
  148. package/Libraries/Pressability/Pressability.js +28 -3
  149. package/Libraries/Pressability/Pressability.win32.js +30 -5
  150. package/Libraries/ReactNative/AppContainer.js +2 -3
  151. package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
  152. package/Libraries/ReactNative/AppRegistry.js +66 -53
  153. package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
  154. package/Libraries/ReactNative/FabricUIManager.js +143 -34
  155. package/Libraries/ReactNative/I18nManager.js +5 -11
  156. package/Libraries/ReactNative/NativeI18nManager.js +7 -5
  157. package/Libraries/ReactNative/PaperUIManager.win32.js +2 -2
  158. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
  159. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
  160. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
  161. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
  162. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
  163. package/Libraries/ReactNative/UIManager.js +8 -0
  164. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
  165. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
  166. package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
  167. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
  168. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
  169. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
  170. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
  171. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
  172. package/Libraries/Renderer/shims/ReactFabric.js +5 -6
  173. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
  174. package/Libraries/Renderer/shims/ReactNative.js +2 -3
  175. package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
  176. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
  177. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
  178. package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
  179. package/Libraries/Share/Share.d.ts +3 -9
  180. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
  181. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
  182. package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +14 -4
  183. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
  184. package/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  185. package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
  186. package/Libraries/StyleSheet/StyleSheet.js +3 -0
  187. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -0
  188. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
  189. package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
  190. package/Libraries/StyleSheet/flattenStyle.js +4 -0
  191. package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
  192. package/Libraries/StyleSheet/processColor.js +1 -2
  193. package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
  194. package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
  195. package/Libraries/Text/Text.d.ts +5 -5
  196. package/Libraries/Text/Text.js +17 -10
  197. package/Libraries/Text/Text.win32.js +354 -0
  198. package/Libraries/Text/TextProps.win32.js +281 -0
  199. package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
  200. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
  201. package/Libraries/Types/CoreEventTypes.d.ts +5 -2
  202. package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
  203. package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
  204. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
  205. package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
  206. package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
  207. package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
  208. package/Libraries/Utilities/Platform.android.js +12 -8
  209. package/Libraries/Utilities/Platform.d.ts +1 -0
  210. package/Libraries/Utilities/Platform.flow.js +84 -0
  211. package/Libraries/Utilities/Platform.flow.win32.js +111 -0
  212. package/Libraries/Utilities/Platform.ios.js +12 -8
  213. package/Libraries/Utilities/Platform.win32.js +12 -8
  214. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  215. package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
  216. package/Libraries/Utilities/SceneTracker.js +1 -1
  217. package/Libraries/Utilities/createPerformanceLogger.js +63 -32
  218. package/Libraries/Utilities/useColorScheme.js +7 -8
  219. package/Libraries/WebPerformance/MemoryInfo.js +1 -1
  220. package/Libraries/WebPerformance/NativePerformance.js +3 -8
  221. package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
  222. package/Libraries/WebPerformance/Performance.js +42 -15
  223. package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
  224. package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
  225. package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
  226. package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
  227. package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
  228. package/Libraries/promiseRejectionTrackingOptions.js +1 -3
  229. package/Libraries/vendor/emitter/EventEmitter.js +17 -17
  230. package/flow/global.js +1 -3
  231. package/flow/jest.js +5 -1
  232. package/{Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
  233. package/jest/__tests__/setup-test.js +18 -0
  234. package/jest/mockModal.js +6 -4
  235. package/jest/setup.js +61 -30
  236. package/jest.config.js +1 -1
  237. package/just-task.js +1 -0
  238. package/overrides.json +51 -46
  239. package/package.json +35 -33
  240. package/src/Libraries/Components/Button/ButtonWin32.Props.ts +1 -1
  241. package/src/Libraries/Components/Button/ButtonWin32.tsx +0 -2
  242. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
  243. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
  244. package/src/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  245. package/src/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  246. package/types/experimental.d.ts +44 -0
  247. package/types/index.d.ts +2 -1
  248. package/types/modules/Devtools.d.ts +1 -0
  249. package/types/modules/globals.d.ts +16 -1
  250. package/IntegrationTests/BUCK +0 -32
  251. package/IntegrationTests/PropertiesUpdateTest.js +0 -29
  252. package/IntegrationTests/RCTRootViewIntegrationTestApp.js +0 -86
  253. package/IntegrationTests/ReactContentSizeUpdateTest.js +0 -89
  254. package/IntegrationTests/SizeFlexibilityUpdateTest.js +0 -106
  255. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
  256. package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
  257. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
  258. package/Libraries/Utilities/AcessibilityMapping.js +0 -154
  259. package/Libraries/Utilities/AcessibilityMapping.win32.js +0 -156
  260. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
  261. package/Libraries/Utilities/useColorScheme.win32.js +0 -26
  262. package/flow/use-sync-external-store.js +0 -20
  263. package/flow-typed/npm/base64-js_v1.x.x.js +0 -12
  264. package/flow-typed/npm/glob_v7.x.x.js +0 -79
  265. package/flow-typed/npm/pretty-format_v26.x.x.js +0 -49
  266. package/flow-typed/npm/promise_v8.x.x.js +0 -30
  267. package/flow-typed/npm/react-dom_v17.x.x.js +0 -139
  268. package/flow-typed/npm/react-test-renderer_v16.x.x.js +0 -79
  269. package/flow-typed/npm/stacktrace-parser_v0.1.x.js +0 -17
  270. package/flow-typed/npm/yargs_v17.x.x.js +0 -341
  271. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
  272. /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
@@ -6,9 +6,8 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict
9
- * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec>>
10
- *
11
- * This file was sync'd from the facebook/react repository.
9
+ * @nolint
10
+ * @generated SignedSource<<652b117c94307244bcf5e4af18928903>>
12
11
  */
13
12
 
14
13
  import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
@@ -98,7 +97,23 @@ export type PartialViewConfig = $ReadOnly<{
98
97
  validAttributes?: PartialAttributeConfiguration,
99
98
  }>;
100
99
 
101
- export type NativeMethods = $ReadOnly<{
100
+ /**
101
+ * Current usages should migrate to this definition
102
+ */
103
+ export interface INativeMethods {
104
+ blur(): void;
105
+ focus(): void;
106
+ measure(callback: MeasureOnSuccessCallback): void;
107
+ measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
108
+ measureLayout(
109
+ relativeToNativeNode: number | ElementRef<HostComponent<mixed>>,
110
+ onSuccess: MeasureLayoutOnSuccessCallback,
111
+ onFail?: () => void,
112
+ ): void;
113
+ setNativeProps(nativeProps: {...}): void;
114
+ }
115
+
116
+ export type NativeMethods = $ReadOnly<{|
102
117
  blur(): void,
103
118
  focus(): void,
104
119
  measure(callback: MeasureOnSuccessCallback): void,
@@ -109,7 +124,11 @@ export type NativeMethods = $ReadOnly<{
109
124
  onFail?: () => void,
110
125
  ): void,
111
126
  setNativeProps(nativeProps: {...}): void,
112
- }>;
127
+ |}>;
128
+
129
+ // This validates that INativeMethods and NativeMethods stay in sync using Flow!
130
+ declare var ensureNativeMethodsAreSynced: NativeMethods;
131
+ (ensureNativeMethodsAreSynced: INativeMethods);
113
132
 
114
133
  export type HostComponent<T> = AbstractComponent<T, $ReadOnly<NativeMethods>>;
115
134
 
@@ -195,6 +214,11 @@ export type ReactNativeType = {
195
214
  ...
196
215
  };
197
216
 
217
+ export opaque type Node = mixed;
218
+ export opaque type InternalInstanceHandle = mixed;
219
+ type PublicInstance = mixed;
220
+ type PublicTextInstance = mixed;
221
+
198
222
  export type ReactFabricType = {
199
223
  findHostInstance_DEPRECATED<TElementType: ElementType>(
200
224
  componentOrHandle: ?(ElementRef<TElementType> | number),
@@ -218,18 +242,12 @@ export type ReactFabricType = {
218
242
  concurrentRoot: ?boolean,
219
243
  ): ?ElementRef<ElementType>,
220
244
  unmountComponentAtNode(containerTag: number): void,
221
- ...
222
- };
223
-
224
- export type ReactNativeEventTarget = {
225
- node: {...},
226
- canonical: {
227
- _nativeTag: number,
228
- viewConfig: ViewConfig,
229
- currentProps: {...},
230
- _internalInstanceHandle: {...},
231
- ...
232
- },
245
+ getNodeFromInternalInstanceHandle(
246
+ internalInstanceHandle: InternalInstanceHandle,
247
+ ): ?Node,
248
+ getPublicInstanceFromInternalInstanceHandle(
249
+ internalInstanceHandle: InternalInstanceHandle,
250
+ ): PublicInstance | PublicTextInstance,
233
251
  ...
234
252
  };
235
253
 
@@ -6,9 +6,8 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict-local
9
- * @generated SignedSource<<47ba85d7f43c9b591d6804827322d00e>>
10
- *
11
- * This file was sync'd from the facebook/react repository.
9
+ * @nolint
10
+ * @generated SignedSource<<1b39316520f5af25f0a141d7d78b0809>>
12
11
  */
13
12
 
14
13
  'use strict';
@@ -109,6 +108,7 @@ exports.get = function (name: string): ViewConfig {
109
108
  'View config getter callback for component `%s` must be a function (received `%s`).%s',
110
109
  name,
111
110
  callback === null ? 'null' : typeof callback,
111
+ // $FlowFixMe[recursive-definition]
112
112
  typeof name[0] === 'string' && /[a-z]/.test(name[0])
113
113
  ? ' Make sure to start component names with a capital letter.'
114
114
  : '',
@@ -6,9 +6,8 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict-local
9
- * @generated SignedSource<<e5e369f149ed8206141b7a3c2855bb85>>
10
- *
11
- * This file was sync'd from the facebook/react repository.
9
+ * @nolint
10
+ * @generated SignedSource<<ede54ac2fa1b9a09e234cdf098048989>>
12
11
  */
13
12
 
14
13
  'use strict';
@@ -12,21 +12,21 @@
12
12
 
13
13
  const Settings = {
14
14
  get(key: string): mixed {
15
- console.warn('Settings is not yet supported on Android');
15
+ console.warn('Settings is not yet supported on this platform.');
16
16
  return null;
17
17
  },
18
18
 
19
19
  set(settings: Object) {
20
- console.warn('Settings is not yet supported on Android');
20
+ console.warn('Settings is not yet supported on this platform.');
21
21
  },
22
22
 
23
23
  watchKeys(keys: string | Array<string>, callback: Function): number {
24
- console.warn('Settings is not yet supported on Android');
24
+ console.warn('Settings is not yet supported on this platform.');
25
25
  return -1;
26
26
  },
27
27
 
28
28
  clearWatch(watchId: number) {
29
- console.warn('Settings is not yet supported on Android');
29
+ console.warn('Settings is not yet supported on this platform.');
30
30
  },
31
31
  };
32
32
 
@@ -27,17 +27,11 @@ export type ShareOptions = {
27
27
  anchor?: number | undefined;
28
28
  };
29
29
 
30
- export type ShareSharedAction = {
31
- action: 'sharedAction';
32
- activityType?: string | undefined;
30
+ export type ShareAction = {
31
+ action: 'sharedAction' | 'dismissedAction';
32
+ activityType?: string | null | undefined;
33
33
  };
34
34
 
35
- export type ShareDismissedAction = {
36
- action: 'dismissedAction';
37
- };
38
-
39
- export type ShareAction = ShareSharedAction | ShareDismissedAction;
40
-
41
35
  export interface ShareStatic {
42
36
  /**
43
37
  * Open a dialog to share text content.
@@ -9,20 +9,25 @@
9
9
  */
10
10
 
11
11
  import type {ProcessedColorValue} from './processColor';
12
- import type {ColorValue} from './StyleSheet';
12
+ import type {ColorValue, NativeColorValue} from './StyleSheet';
13
13
 
14
- export opaque type NativeColorValue = {
14
+ /** The actual type of the opaque NativeColorValue on Android platform */
15
+ type LocalNativeColorValue = {
15
16
  resource_paths?: Array<string>,
16
17
  };
17
18
 
18
19
  export const PlatformColor = (...names: Array<string>): ColorValue => {
19
- return {resource_paths: names};
20
+ /* $FlowExpectedError[incompatible-return]
21
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */
22
+ return ({resource_paths: names}: LocalNativeColorValue);
20
23
  };
21
24
 
22
25
  export const normalizeColorObject = (
23
26
  color: NativeColorValue,
24
27
  ): ?ProcessedColorValue => {
25
- if ('resource_paths' in color) {
28
+ /* $FlowExpectedError[incompatible-cast]
29
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */
30
+ if ('resource_paths' in (color: LocalNativeColorValue)) {
26
31
  return color;
27
32
  }
28
33
  return null;
@@ -9,9 +9,10 @@
9
9
  */
10
10
 
11
11
  import type {ProcessedColorValue} from './processColor';
12
- import type {ColorValue} from './StyleSheet';
12
+ import type {ColorValue, NativeColorValue} from './StyleSheet';
13
13
 
14
- export opaque type NativeColorValue = {
14
+ /** The actual type of the opaque NativeColorValue on iOS platform */
15
+ type LocalNativeColorValue = {
15
16
  semantic?: Array<string>,
16
17
  dynamic?: {
17
18
  light: ?(ColorValue | ProcessedColorValue),
@@ -22,7 +23,8 @@ export opaque type NativeColorValue = {
22
23
  };
23
24
 
24
25
  export const PlatformColor = (...names: Array<string>): ColorValue => {
25
- return {semantic: names};
26
+ // $FlowExpectedError[incompatible-return] LocalNativeColorValue is the iOS LocalNativeColorValue type
27
+ return ({semantic: names}: LocalNativeColorValue);
26
28
  };
27
29
 
28
30
  export type DynamicColorIOSTuplePrivate = {
@@ -35,19 +37,21 @@ export type DynamicColorIOSTuplePrivate = {
35
37
  export const DynamicColorIOSPrivate = (
36
38
  tuple: DynamicColorIOSTuplePrivate,
37
39
  ): ColorValue => {
38
- return {
40
+ return ({
39
41
  dynamic: {
40
42
  light: tuple.light,
41
43
  dark: tuple.dark,
42
44
  highContrastLight: tuple.highContrastLight,
43
45
  highContrastDark: tuple.highContrastDark,
44
46
  },
45
- };
47
+ /* $FlowExpectedError[incompatible-return]
48
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
49
+ }: LocalNativeColorValue);
46
50
  };
47
51
 
48
- export const normalizeColorObject = (
49
- color: NativeColorValue,
50
- ): ?ProcessedColorValue => {
52
+ const _normalizeColorObject = (
53
+ color: LocalNativeColorValue,
54
+ ): ?LocalNativeColorValue => {
51
55
  if ('semantic' in color) {
52
56
  // an ios semantic color
53
57
  return color;
@@ -56,7 +60,7 @@ export const normalizeColorObject = (
56
60
 
57
61
  // a dynamic, appearance aware color
58
62
  const dynamic = color.dynamic;
59
- const dynamicColor: NativeColorValue = {
63
+ const dynamicColor: LocalNativeColorValue = {
60
64
  dynamic: {
61
65
  // $FlowFixMe[incompatible-use]
62
66
  light: normalizeColor(dynamic.light),
@@ -70,17 +74,22 @@ export const normalizeColorObject = (
70
74
  };
71
75
  return dynamicColor;
72
76
  }
73
-
74
77
  return null;
75
78
  };
76
79
 
77
- export const processColorObject = (
80
+ export const normalizeColorObject: (
78
81
  color: NativeColorValue,
79
- ): ?NativeColorValue => {
82
+ /* $FlowExpectedError[incompatible-type]
83
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
84
+ ) => ?ProcessedColorValue = _normalizeColorObject;
85
+
86
+ const _processColorObject = (
87
+ color: LocalNativeColorValue,
88
+ ): ?LocalNativeColorValue => {
80
89
  if ('dynamic' in color && color.dynamic != null) {
81
90
  const processColor = require('./processColor').default;
82
91
  const dynamic = color.dynamic;
83
- const dynamicColor: NativeColorValue = {
92
+ const dynamicColor: LocalNativeColorValue = {
84
93
  dynamic: {
85
94
  // $FlowFixMe[incompatible-use]
86
95
  light: processColor(dynamic.light),
@@ -96,3 +105,9 @@ export const processColorObject = (
96
105
  }
97
106
  return color;
98
107
  };
108
+
109
+ export const processColorObject: (
110
+ color: NativeColorValue,
111
+ /* $FlowExpectedError[incompatible-type]
112
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
113
+ ) => ?NativeColorValue = _processColorObject;
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {ColorValue} from './StyleSheet';
13
+ import type {ColorValue, NativeColorValue} from './StyleSheet';
14
14
  import type {ProcessedColorValue} from './processColor';
15
15
 
16
16
  type GradientColorStop = {|
@@ -23,26 +23,36 @@ export type GradientColorValueWin32 = {|
23
23
  colorStops: Array<GradientColorStop>,
24
24
  |};
25
25
 
26
- export opaque type NativeColorValue =
26
+ /** The actual type of the opaque NativeColorValue on Windows platform */
27
+ type LocalNativeColorValue =
27
28
  | $ReadOnly<GradientColorValueWin32>
28
29
  | $ReadOnly<{|
29
30
  resource_paths?: Array<string>,
30
31
  |}>;
31
32
 
32
33
  export const PlatformColor = (...names: Array<string>): ColorValue => {
33
- return {resource_paths: names};
34
+ // $FlowExpectedError[incompatible-return] LocalNativeColorValue is the Windows LocalNativeColorValue type
35
+ return ({resource_paths: names}: LocalNativeColorValue);
34
36
  };
35
37
 
36
38
  export const ColorGradientWin32Private = (
37
39
  gradientColor: GradientColorValueWin32,
38
40
  ): ColorValue => {
41
+ // $FlowExpectedError[incompatible-return]
39
42
  return gradientColor;
40
43
  };
41
44
 
42
45
  export const normalizeColorObject = (
43
46
  color: NativeColorValue,
44
47
  ): ?ProcessedColorValue => {
45
- if ('resource_paths' in color || 'gradientDirection' in color) {
48
+ /* $FlowExpectedError[incompatible-cast]
49
+ * LocalNativeColorValue is the actual type of the opaque NativeColorValue on Windows platform */
50
+ if (
51
+ // $FlowExpectedError[incompatible-cast]
52
+ 'resource_paths' in (color: LocalNativeColorValue) ||
53
+ // $FlowExpectedError[incompatible-cast]
54
+ 'gradientDirection' in (color: LocalNativeColorValue)
55
+ ) {
46
56
  return color;
47
57
  }
48
58
  return null;
@@ -10,7 +10,7 @@
10
10
 
11
11
  import type {ColorValue} from './StyleSheet';
12
12
 
13
- import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
13
+ import {DynamicColorIOSPrivate} from './PlatformColorValueTypes.ios';
14
14
 
15
15
  export type DynamicColorIOSTuple = {
16
16
  light: ColorValue,
@@ -30,7 +30,7 @@ export type GradientColorValueWin32 = {
30
30
  };
31
31
 
32
32
  /**
33
- * Creates a color value that renders using a grandient brush.
33
+ * Creates a color value that renders using a gradient brush.
34
34
  * This can be used to provide a value to most components that take a standard color value.
35
35
  */
36
36
  export declare const ColorGradientWin32: (
@@ -35,7 +35,16 @@ export namespace StyleSheet {
35
35
  * Creates a StyleSheet style reference from the given object.
36
36
  */
37
37
  export function create<T extends NamedStyles<T> | NamedStyles<any>>(
38
- styles: T | NamedStyles<T>,
38
+ // The extra & NamedStyles<any> here helps Typescript catch typos: e.g.,
39
+ // the following code would not error with `styles: T | NamedStyles<T>`,
40
+ // but would error with `styles: T & NamedStyles<any>`
41
+ //
42
+ // ```ts
43
+ // StyleSheet.create({
44
+ // someComponent: { marginLeft: 1, magrinRight: 1 },
45
+ // });
46
+ // ```
47
+ styles: T & NamedStyles<any>,
39
48
  ): T;
40
49
 
41
50
  /**
@@ -27,6 +27,8 @@ const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleA
27
27
  const PixelRatio = require('../Utilities/PixelRatio').default;
28
28
  const flatten = require('./flattenStyle');
29
29
 
30
+ export type {NativeColorValue} from './StyleSheetTypes';
31
+
30
32
  /**
31
33
  * This type should be used as the type for anything that is a color. It is
32
34
  * most useful when using DynamicColorIOS which can be a string or a dynamic
@@ -361,6 +363,7 @@ module.exports = {
361
363
  /**
362
364
  * Creates a StyleSheet style reference from the given object.
363
365
  */
366
+ // $FlowFixMe[unsupported-variance-annotation]
364
367
  create<+S: ____Styles_Internal>(obj: S): $ReadOnly<S> {
365
368
  // TODO: This should return S as the return type. But first,
366
369
  // we need to codemod all the callsites that are typing this
@@ -28,6 +28,8 @@ const PixelRatio = require('../Utilities/PixelRatio').default;
28
28
  const Platform = require('../Utilities/Platform'); // [Win32]
29
29
  const flatten = require('./flattenStyle');
30
30
 
31
+ export type {NativeColorValue} from './StyleSheetTypes';
32
+
31
33
  /**
32
34
  * This type should be used as the type for anything that is a color. It is
33
35
  * most useful when using DynamicColorIOS which can be a string or a dynamic
@@ -363,6 +365,7 @@ module.exports = {
363
365
  /**
364
366
  * Creates a StyleSheet style reference from the given object.
365
367
  */
368
+ // $FlowFixMe[unsupported-variance-annotation]
366
369
  create<+S: ____Styles_Internal>(obj: S): $ReadOnly<S> {
367
370
  // TODO: This should return S as the return type. But first,
368
371
  // we need to codemod all the callsites that are typing this
@@ -173,25 +173,31 @@ interface MatrixTransform {
173
173
  matrix: AnimatableNumericValue[];
174
174
  }
175
175
 
176
+ type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T
177
+ ? {[P in K]: T[K]} & {[P in Exclude<keyof T, K>]?: never}
178
+ : never;
179
+
176
180
  export interface TransformsStyle {
177
181
  transform?:
178
- | (
179
- | PerpectiveTransform
180
- | RotateTransform
181
- | RotateXTransform
182
- | RotateYTransform
183
- | RotateZTransform
184
- | ScaleTransform
185
- | ScaleXTransform
186
- | ScaleYTransform
187
- | TranslateXTransform
188
- | TranslateYTransform
189
- | SkewXTransform
190
- | SkewYTransform
191
- | MatrixTransform
192
- )[]
182
+ | MaximumOneOf<
183
+ PerpectiveTransform &
184
+ RotateTransform &
185
+ RotateXTransform &
186
+ RotateYTransform &
187
+ RotateZTransform &
188
+ ScaleTransform &
189
+ ScaleXTransform &
190
+ ScaleYTransform &
191
+ TranslateXTransform &
192
+ TranslateYTransform &
193
+ SkewXTransform &
194
+ SkewYTransform &
195
+ MatrixTransform
196
+ >[]
193
197
  | string
194
198
  | undefined;
199
+ transformOrigin?: Array<string | number> | string | undefined;
200
+
195
201
  /**
196
202
  * @deprecated Use matrix in transform prop instead.
197
203
  */
@@ -274,7 +280,15 @@ export type FontVariant =
274
280
  | 'oldstyle-nums'
275
281
  | 'lining-nums'
276
282
  | 'tabular-nums'
277
- | 'proportional-nums';
283
+ | 'proportional-nums'
284
+ | 'common-ligatures'
285
+ | 'no-common-ligatures'
286
+ | 'discretionary-ligatures'
287
+ | 'no-discretionary-ligatures'
288
+ | 'historical-ligatures'
289
+ | 'no-historical-ligatures'
290
+ | 'contextual'
291
+ | 'no-contextual';
278
292
  export interface TextStyleIOS extends ViewStyle {
279
293
  fontVariant?: FontVariant[] | undefined;
280
294
  textDecorationColor?: ColorValue | undefined;
@@ -327,7 +341,7 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
327
341
  textShadowOffset?: {width: number; height: number} | undefined;
328
342
  textShadowRadius?: number | undefined;
329
343
  textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase' | undefined;
330
- testID?: string | undefined;
344
+ userSelect?: 'auto' | 'none' | 'text' | 'contain' | 'all' | undefined;
331
345
  }
332
346
 
333
347
  /**
@@ -11,7 +11,6 @@
11
11
  'use strict';
12
12
 
13
13
  import type AnimatedNode from '../Animated/nodes/AnimatedNode';
14
- import type {NativeColorValue} from './PlatformColorValueTypes';
15
14
  import type {
16
15
  ____DangerouslyImpreciseStyle_InternalOverrides,
17
16
  ____ImageStyle_InternalOverrides,
@@ -21,6 +20,7 @@ import type {
21
20
  } from './private/_StyleSheetTypesOverrides';
22
21
  import type {____TransformStyle_Internal} from './private/_TransformStyle';
23
22
 
23
+ declare export opaque type NativeColorValue;
24
24
  export type ____ColorValue_Internal = null | string | number | NativeColorValue;
25
25
  export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>;
26
26
  export type PointValue = {
@@ -134,6 +134,80 @@ type ____LayoutStyle_Internal = $ReadOnly<{
134
134
  */
135
135
  top?: DimensionValue,
136
136
 
137
+ /** `inset` is a shorthand that corresponds to the top, right, bottom, and/or left properties.
138
+ *
139
+ * It works similarly to `inset` in CSS, but in React Native you
140
+ * must use points or percentages. Ems and other units are not supported.
141
+ *
142
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset
143
+ * for more details of how `inset` affects layout.
144
+ */
145
+ inset?: DimensionValue,
146
+
147
+ /** `insetBlock` is a shorthand that corresponds to the `insetBlockStart` and `insetBlockEnd` properties.
148
+ *
149
+ * It works similarly to `inset-block` in CSS, but in React Native you
150
+ * must use points or percentages. Ems and other units are not supported.
151
+ *
152
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block
153
+ * for more details of how `inset-block` affects layout.
154
+ */
155
+ insetBlock?: DimensionValue,
156
+
157
+ /** `insetBlockEnd` is a logical property that sets the length that an
158
+ * element is offset in the block direction from its ending edge.
159
+ *
160
+ * It works similarly to `inset-block-end` in CSS, but in React Native you
161
+ * must use points or percentages. Ems and other units are not supported.
162
+ *
163
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-end
164
+ * for more details of how `inset-block-end` affects layout.
165
+ */
166
+ insetBlockEnd?: DimensionValue,
167
+
168
+ /** `insetBlockStart` is a logical property that sets the length that an
169
+ * element is offset in the block direction from its starting edge.
170
+ *
171
+ * It works similarly to `inset-block-start` in CSS, but in React Native you
172
+ * must use points or percentages. Ems and other units are not supported.
173
+ *
174
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-start
175
+ * for more details of how `inset-block-start` affects layout.
176
+ */
177
+ insetBlockStart?: DimensionValue,
178
+
179
+ /** `insetInline` is a shorthand that corresponds to the `insetInlineStart` and `insetInlineEnd` properties.
180
+ *
181
+ * It works similarly to `inset-inline` in CSS, but in React Native you
182
+ * must use points or percentages. Ems and other units are not supported.
183
+ *
184
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline
185
+ * for more details of how `inset-inline` affects layout.
186
+ */
187
+ insetInline?: DimensionValue,
188
+
189
+ /** `insetInlineEnd` is a logical property that sets the length that an
190
+ * element is offset in the starting inline direction.
191
+ *
192
+ * It works similarly to `inset-inline-end` in CSS, but in React Native you
193
+ * must use points or percentages. Ems and other units are not supported.
194
+ *
195
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-end
196
+ * for more details of how `inset-inline-end` affects layout.
197
+ */
198
+ insetInlineEnd?: DimensionValue,
199
+
200
+ /** `insetInlineStart` is a logical property that sets the length that an
201
+ * element is offset in the starting inline direction.
202
+ *
203
+ * It works similarly to `inset-inline-start` in CSS, but in React Native you
204
+ * must use points or percentages. Ems and other units are not supported.
205
+ *
206
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start
207
+ * for more details of how `inset-inline-start` affects layout.
208
+ */
209
+ insetInlineStart?: DimensionValue,
210
+
137
211
  /** `minWidth` is the minimum width for this component, in logical pixels.
138
212
  *
139
213
  * It works similarly to `min-width` in CSS, but in React Native you
@@ -714,6 +788,14 @@ export type ____FontVariantArray_Internal = $ReadOnlyArray<
714
788
  | 'oldstyle-nums'
715
789
  | 'lining-nums'
716
790
  | 'tabular-nums'
791
+ | 'common-ligatures'
792
+ | 'no-common-ligatures'
793
+ | 'discretionary-ligatures'
794
+ | 'no-discretionary-ligatures'
795
+ | 'historical-ligatures'
796
+ | 'no-historical-ligatures'
797
+ | 'contextual'
798
+ | 'no-contextual'
717
799
  | 'proportional-nums'
718
800
  | 'stylistic-one'
719
801
  | 'stylistic-two'
@@ -810,20 +892,22 @@ type GenericStyleProp<+T> =
810
892
  | $ReadOnlyArray<GenericStyleProp<T>>;
811
893
 
812
894
  export type ____DangerouslyImpreciseStyleProp_Internal = GenericStyleProp<
813
- $Shape<____DangerouslyImpreciseStyle_Internal>,
895
+ Partial<____DangerouslyImpreciseStyle_Internal>,
814
896
  >;
815
897
  export type ____ViewStyleProp_Internal = GenericStyleProp<
816
- $ReadOnly<$Shape<____ViewStyle_Internal>>,
898
+ $ReadOnly<Partial<____ViewStyle_Internal>>,
817
899
  >;
818
900
  export type ____TextStyleProp_Internal = GenericStyleProp<
819
- $ReadOnly<$Shape<____TextStyle_Internal>>,
901
+ $ReadOnly<Partial<____TextStyle_Internal>>,
820
902
  >;
821
903
  export type ____ImageStyleProp_Internal = GenericStyleProp<
822
- $ReadOnly<$Shape<____ImageStyle_Internal>>,
904
+ $ReadOnly<Partial<____ImageStyle_Internal>>,
823
905
  >;
824
906
 
825
907
  export type ____Styles_Internal = {
826
- +[key: string]: $Shape<____DangerouslyImpreciseStyle_Internal>,
908
+ // $FlowFixMe[incompatible-exact]
909
+ // $FlowFixMe[incompatible-type]
910
+ +[key: string]: Partial<____DangerouslyImpreciseStyle_Internal>,
827
911
  ...
828
912
  };
829
913
 
@@ -13,6 +13,7 @@
13
13
  import type {DangerouslyImpreciseStyleProp} from './StyleSheet';
14
14
  import type {____FlattenStyleProp_Internal} from './StyleSheetTypes';
15
15
 
16
+ // $FlowFixMe[unsupported-variance-annotation]
16
17
  function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
17
18
  style: ?TStyleProp,
18
19
  // $FlowFixMe[underconstrained-implicit-instantiation]
@@ -30,11 +31,14 @@ function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
30
31
  // $FlowFixMe[underconstrained-implicit-instantiation]
31
32
  const computedStyle = flattenStyle(style[i]);
32
33
  if (computedStyle) {
34
+ // $FlowFixMe[invalid-in-rhs]
33
35
  for (const key in computedStyle) {
36
+ // $FlowFixMe[incompatible-use]
34
37
  result[key] = computedStyle[key];
35
38
  }
36
39
  }
37
40
  }
41
+ // $FlowFixMe[incompatible-return]
38
42
  return result;
39
43
  }
40
44