Skip to content

Commit d9f34bd

Browse files
fkgozalifacebook-github-bot
authored andcommitted
TM iOS: added helper to check whether a class is TurboModule compatible
Summary: Similar macro as the existing one, but this one checks for the class directly. Reviewed By: RSNara Differential Revision: D14016664 fbshipit-source-id: aae9a9c1cc95f56d2eff6c9021a714ed4a843db3
1 parent 21290b5 commit d9f34bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#import <jsireact/JSCallInvoker.h>
1616
#import <jsireact/TurboModule.h>
1717

18-
#define RCT_IS_TURBO_MODULE_INSTANCE(module) ((RCTTurboModuleEnabled() && [[(module) class] conformsToProtocol:@protocol(RCTTurboModule)]))
18+
#define RCT_IS_TURBO_MODULE_CLASS(klass) ((RCTTurboModuleEnabled() && [(klass) conformsToProtocol:@protocol(RCTTurboModule)]))
19+
#define RCT_IS_TURBO_MODULE_INSTANCE(module) RCT_IS_TURBO_MODULE_CLASS([(module) class])
1920

2021
namespace facebook {
2122
namespace react {

0 commit comments

Comments
 (0)