UNPKG

981 Btext/x-cView Raw
1/*
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#import <Foundation/Foundation.h>
9
10#import <React/RCTBridgeMethod.h>
11#import <React/RCTBridgeModule.h>
12#import <React/RCTNullability.h>
13
14@class RCTBridge;
15
16@interface RCTMethodArgument : NSObject
17
18@property (nonatomic, copy, readonly) NSString *type;
19@property (nonatomic, readonly) RCTNullability nullability;
20@property (nonatomic, readonly) BOOL unused;
21
22@end
23
24@interface RCTModuleMethod : NSObject <RCTBridgeMethod>
25
26@property (nonatomic, readonly) Class moduleClass;
27@property (nonatomic, readonly) SEL selector;
28
29- (instancetype)initWithExportedMethod:(const RCTMethodInfo *)exportMethod
30 moduleClass:(Class)moduleClass NS_DESIGNATED_INITIALIZER;
31
32@end
33
34RCT_EXTERN NSString *RCTParseMethodSignature(const char *input, NSArray<RCTMethodArgument *> **arguments);