-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TM] Add spec for Linking #24877
[TM] Add spec for Linking #24877
Conversation
This comment has been minimized.
This comment has been minimized.
Libraries/Linking/NativeLinking.js
Outdated
|
||
const moduleName = | ||
Platform.OS === 'ios' ? 'NativeLinkingManager' : 'NativeIntentAndroid'; | ||
export default TurboModuleRegistry.getEnforcing<Spec>(moduleName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use a variable for module name, so that scripting can collect these callsites (we have an internal script that find all JS callsites for a TurboModule).
if (Platform.OS === 'ios') {
export default TurboModuleRegistry.getEnforcing<Spec>('NativeLinkingManager');
} else {
export default TurboModuleRegistry.getEnforcing<Spec>('NativeIntentAndroid');
}
@RSNara: we probably should rename these modules in the native side to have the same name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkgozali btw, it is not legal to export that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default (Platform.OS === 'ios'
? TurboModuleRegistry.getEnforcing<Spec>('LinkingManager')
: TurboModuleRegistry.getEnforcing<Spec>('IntentAndroid'));
^ is valid
lgtm, landing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkgozali is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @ericlewis in 99899d0. When will my fix make it into a release? | Upcoming Releases |
Summary: Part of facebook#24875, adds a spec for linking. ## Changelog [General] [Added] - TM Spec for Linking Pull Request resolved: facebook#24877 Differential Revision: D15374328 Pulled By: fkgozali fbshipit-source-id: 4b86a75d58d275c0ddc864b4f3f1ec489b0b408b
Summary
Part of #24875, adds a spec for linking.
Changelog
[General] [Added] - TM Spec for Linking
Test Plan
Flow passes.