Use more accurate type in LinkingManager spec file#45450
Closed
acoates-ms wants to merge 1 commit into
Closed
Conversation
Contributor
|
@zeyap has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
This pull request was successfully merged by @acoates-ms in 892c835 When will my fix make it into a release? | How to file a pick request? |
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.
Summary:
The
LinkingModule.getInitialURLmethod is declared as returning aProimise<string>but looking at the implementation it can also return null:react-native/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm
Line 166 in a96272e
which is returned by
react-native/packages/react-native/Libraries/Linking/Linking.js
Line 96 in a96272e
which happens to expand the type to the correct type for most external users.
React-native-window's turbomodule codegen is more type strict, and so cannot return null with the current spec.
Changelog:
[INTERNAL] [FIXED] - Use more accurate type in LinkingManager spec file
Test Plan:
Type change only, so should only affect build time change which will be caught by CI.
Have verified that this type change allows react-native-windows to return null.