mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 23:38:11 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
21290b569b
commit
d9f34bdbb2
@@ -15,7 +15,8 @@
|
||||
#import <jsireact/JSCallInvoker.h>
|
||||
#import <jsireact/TurboModule.h>
|
||||
|
||||
#define RCT_IS_TURBO_MODULE_INSTANCE(module) ((RCTTurboModuleEnabled() && [[(module) class] conformsToProtocol:@protocol(RCTTurboModule)]))
|
||||
#define RCT_IS_TURBO_MODULE_CLASS(klass) ((RCTTurboModuleEnabled() && [(klass) conformsToProtocol:@protocol(RCTTurboModule)]))
|
||||
#define RCT_IS_TURBO_MODULE_INSTANCE(module) RCT_IS_TURBO_MODULE_CLASS([(module) class])
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
Reference in New Issue
Block a user