<commit_before>#import <Foundation/Foundation.h>

@class KSPromise;

typedef id(^promiseValueCallback)(id);
typedef id(^promiseErrorCallback)(NSError *);
typedef void(^deferredCallback)(KSPromise *);

@interface KSPromise : NSObject
@property (strong, nonatomic, readonly) id value;
@property (strong, nonatomic, readonly) NSError *error;

+ (KSPromise *)join:(NSArray *)promises;

- (KSPromise *)then:(promiseValueCallback)fulfilledCallback error:(promiseErrorCallback)errorCallback;
- (void)cancel;

#pragma deprecated
- (void)whenResolved:(deferredCallback)complete;
- (void)whenRejected:(deferredCallback)complete;
- (void)whenFulfilled:(deferredCallback)complete;


@end<commit_msg>mark old interface as deprecated<commit_after>#import <Foundation/Foundation.h>

@class KSPromise;

typedef id(^promiseValueCallback)(id);
typedef id(^promiseErrorCallback)(NSError *);
typedef void(^deferredCallback)(KSPromise *);

@interface KSPromise : NSObject
@property (strong, nonatomic, readonly) id value;
@property (strong, nonatomic, readonly) NSError *error;

+ (KSPromise *)join:(NSArray *)promises;

- (KSPromise *)then:(promiseValueCallback)fulfilledCallback error:(promiseErrorCallback)errorCallback;
- (void)cancel;

#pragma deprecated
- (void)whenResolved:(deferredCallback)complete DEPRECATED_ATTRIBUTE;
- (void)whenRejected:(deferredCallback)complete DEPRECATED_ATTRIBUTE;
- (void)whenFulfilled:(deferredCallback)complete DEPRECATED_ATTRIBUTE;


@end
{'fraction_non_alphanumeric': 0.12637362637362637, 'fraction_numerical': 0.0, 'mean_word_length': 10.207692307692307, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6570826', 'n_tokens_mistral': 489, 'n_tokens_neox': 462, 'n_words': 82}