Skip to content

Use more accurate type in LinkingManager spec file#45450

Closed
acoates-ms wants to merge 1 commit into
facebook:mainfrom
acoates-ms:strictLinkingManager
Closed

Use more accurate type in LinkingManager spec file#45450
acoates-ms wants to merge 1 commit into
facebook:mainfrom
acoates-ms:strictLinkingManager

Conversation

@acoates-ms
Copy link
Copy Markdown
Contributor

Summary:

The LinkingModule.getInitialURL method is declared as returning a Proimise<string> but looking at the implementation it can also return null:

resolve(RCTNullIfNil(initialURL.absoluteString));

which is returned by
getInitialURL(): Promise<?string> {

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.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jul 16, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@zeyap has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@zeyap merged this pull request in 892c835.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 16, 2024
@github-actions
Copy link
Copy Markdown

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Microsoft Partner: Microsoft Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants