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:
Kevin Gozali
2019-02-08 21:03:31 -08:00
committed by Facebook Github Bot
parent 21290b569b
commit d9f34bdbb2

View File

@@ -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 {