Repository navigation
fix: pass the TypeScript compatibility check on React Native 0.86 and 0.87 - #10941
Conversation
… 0.87 Annotate the codegen component export so its type can be named on 0.87, ignore backgroundImage where 0.86 types lack it, and skip the common-app checks on 0.86, because the app uses backgroundImage.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to
|
|
Hi, Bruce here. |
Note
This pull request was authored by AI on behalf of @tjzel.
Summary
The nightly TypeScript compatibility check failed on React Native 0.86 and 0.87. On 0.87,
tsccould not name the inferred type of theSharedTransitionBoundaryNativeComponentexport (TS2742), so I cast it toHostComponent<NativeProps>, which the codegen parser accepts. On 0.86,ViewStylehas onlyexperimental_backgroundImage, so I added the same@ts-ignore Available since RN 0.87to the web props config and a unit test that the native config already has, and I typed the other unit test through both keys.common-appusesbackgroundImagein 28 places and cannot compile against 0.86 types, so I skipped the two app checks on 0.86. The library source, plugin and type tests are still checked on 0.86.Test plan
I ran every step of the compatibility check locally after
yarn up react-native@0.87andyarn up react-native@0.86, and all steps that run pass. The check also runs on this PR.Changelog
yarn changelog:addfor each changed package, or this PR does not changereact-native-reanimatedorreact-native-worklets.