mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Added lightweight generic annotations
Summary: public Added lightweight genarics annotations to make the code more readable and help the compiler catch bugs. Fixed some type bugs and improved bridge validation in a few places. Reviewed By: javache Differential Revision: D2600189 fb-gh-sync-id: f81e22f2cdc107bf8d0b15deec6d5b83aacc5b56
This commit is contained in:
committed by
facebook-github-bot-7
parent
31565781f2
commit
c5b990f65f
@@ -35,6 +35,9 @@ typedef void (^RCTApplierBlock)(RCTSparseArray *viewRegistry);
|
||||
*/
|
||||
@interface RCTShadowView : NSObject <RCTComponent>
|
||||
|
||||
- (NSArray<RCTShadowView *> *)reactSubviews;
|
||||
- (RCTShadowView *)reactSuperview;
|
||||
|
||||
@property (nonatomic, weak, readonly) RCTShadowView *superview;
|
||||
@property (nonatomic, assign, readonly) css_node_t *cssNode;
|
||||
@property (nonatomic, copy) NSString *viewName;
|
||||
@@ -120,27 +123,27 @@ typedef void (^RCTApplierBlock)(RCTSparseArray *viewRegistry);
|
||||
* The applierBlocks set contains RCTApplierBlock functions that must be applied
|
||||
* on the main thread in order to update the view.
|
||||
*/
|
||||
- (void)collectUpdatedProperties:(NSMutableSet *)applierBlocks
|
||||
- (void)collectUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary *)parentProperties;
|
||||
|
||||
/**
|
||||
* Process the updated properties and apply them to view. Shadow view classes
|
||||
* that add additional propagating properties should override this method.
|
||||
*/
|
||||
- (NSDictionary *)processUpdatedProperties:(NSMutableSet *)applierBlocks
|
||||
- (NSDictionary *)processUpdatedProperties:(NSMutableSet<RCTApplierBlock> *)applierBlocks
|
||||
parentProperties:(NSDictionary *)parentProperties NS_REQUIRES_SUPER;
|
||||
|
||||
/**
|
||||
* Calculate all views whose frame needs updating after layout has been calculated.
|
||||
* The viewsWithNewFrame set contains the reactTags of the views that need updating.
|
||||
*/
|
||||
- (void)collectRootUpdatedFrames:(NSMutableSet *)viewsWithNewFrame;
|
||||
- (void)collectRootUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame;
|
||||
|
||||
/**
|
||||
* Recursively apply layout to children.
|
||||
*/
|
||||
- (void)applyLayoutNode:(css_node_t *)node
|
||||
viewsWithNewFrame:(NSMutableSet *)viewsWithNewFrame
|
||||
viewsWithNewFrame:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
||||
absolutePosition:(CGPoint)absolutePosition NS_REQUIRES_SUPER;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user