TM iOS: Util to check if an id is TurboModule instance

Summary: Simple macro to do check if TurboModule is enabled and the particular object is RCTTurboModule compliant.

Reviewed By: PeteTheHeat

Differential Revision: D13978368

fbshipit-source-id: 660c7cab7bb074d80d57abead951dad19306ae73
This commit is contained in:
Kevin Gozali 2019-02-06 15:55:49 -08:00 committed by Facebook Github Bot
parent adc1410572
commit 3e9f9cfe47
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#import <jsireact/JSCallInvoker.h> #import <jsireact/JSCallInvoker.h>
#import <jsireact/TurboModule.h> #import <jsireact/TurboModule.h>
#define RCT_IS_TURBO_MODULE_INSTANCE(module) ((RCTTurboModuleEnabled() && [[(module) class] conformsToProtocol:@protocol(RCTTurboModule)]))
namespace facebook { namespace facebook {
namespace react { namespace react {