This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function a(args: { a1: Array<number>, a2: number }) { | |
// Should Error | |
console.log(args.a1.join(',')); | |
} | |
a({}); | |
// Ok, we try the exact object now | |
function b(args: {| a1: Array<number>, a2: number |}) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef void(^AsyncBlock)(dispatch_block_t completionHandler); | |
@interface AsyncBlockOperation : NSOperation | |
@property (nonatomic, readonly, copy) AsyncBlock block; | |
+ (instancetype)asyncBlockOperationWithBlock:(AsyncBlock)block; |