Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use more accurate type in LinkingManager spec file (#45450)
Summary: The `LinkingModule.getInitialURL` method is declared as returning a `Proimise<string>` but looking at the implementation it can also return null: https://github.com/facebook/react-native/blob/a96272e27eeee0c7a26e73bb32e55d3ef8d741aa/packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm#L166 which is returned by https://github.com/facebook/react-native/blob/a96272e27eeee0c7a26e73bb32e55d3ef8d741aa/packages/react-native/Libraries/Linking/Linking.js#L96 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 Pull Request resolved: #45450 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. Reviewed By: robhogan Differential Revision: D59816089 Pulled By: zeyap fbshipit-source-id: 9810f150ce84b503883e72b1f29518d2e62258b6
- Loading branch information