Skip to content

[flow] Migrate type param bounds to extends syntax in ReactNativeTypes#681

Draft
everettbu wants to merge 1 commit into
mainfrom
flow-extends-syntax-ReactNativeTypes
Draft

[flow] Migrate type param bounds to extends syntax in ReactNativeTypes#681
everettbu wants to merge 1 commit into
mainfrom
flow-extends-syntax-ReactNativeTypes

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35996
Original author: marcoww6


Summary

  • Migrates deprecated Flow type parameter bound syntax <T: Type> to <T extends Type> in ReactNativeTypes.js
  • This is the source file that gets synced to react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js via the build pipeline
  • Fixes the source-of-truth so the downstream sync in D95907848 picks up the change automatically

Context

D95907848 codemodded the synced copy in fbsource, but reviewer noted this file is synced from the React repo and must be changed here first (see PR #35989 comment).

Test plan

  • Verified all 5 occurrences updated (InspectorDataGetter, ReactNativeType.findHostInstance_DEPRECATED, ReactNativeType.findNodeHandle, ReactFabricType.findHostInstance_DEPRECATED, ReactFabricType.findNodeHandle)
  • Confirmed file parses correctly with flow-remove-types
  • CI Flow type check

…Types

Flow's type parameter bound syntax `<T: Type>` has been deprecated in
favor of `<T extends Type>`. This updates the 5 occurrences in
ReactNativeTypes.js to use the new syntax.

This is the source file that gets synced to react-native-github at
Libraries/Renderer/shims/ReactNativeTypes.js via the build pipeline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants