Repository navigation
Conversation
The published declarations re-exported UnsafeObject from react-native/Libraries/Types/CodegenTypes. React Native 0.88 sets "types": null for ./Libraries/* unless the react-native-legacy-deep-imports condition is set, so apps with skipLibCheck off got TS2307. The type is now defined locally as object. Codegen recognizes UnsafeObject by name and does not follow the import, so the generated schema for NativeRNSentry stays the same. Importing CodegenTypes from the react-native entry was not an option because it exists only since React Native 0.80 and the peer range starts at 0.65. Fixes #7033
Replace the placeholder in the CHANGELOG entry with the PR number.
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
📲 Install BuildsAndroid
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
The SDK now defines
UnsafeObjectitself instead of re-exporting it fromreact-native/Libraries/Types/CodegenTypes. Codegen recognizesUnsafeObjectby name, so the generated schema forNativeRNSentrydoes not change.💡 Motivation and Context
React Native 0.88 sets
"types": nullfor./Libraries/*unless thereact-native-legacy-deep-importscondition is set, so apps withskipLibCheck: falsegot TS2307 from our declarations. TheCodegenTypesexport fromreact-nativeexists only from 0.80, and our peer range starts at 0.65, so we could not use it.Fixes the first part of #7033. The DOM types part is out of scope.
💚 How did you test it?
The codegen schema for
NativeRNSentry.tsis identical before and after the change. With the built declarations, the reproducer from #7033 no longer reports TS2307.yarn lint,test:sdk,circularDepCheckandapi-report:checkpass.📝 Checklist
sendDefaultPIIis enabled.