-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Milestone
Description
The Obj-C API is a little awkward with the nested method calls thanks to Obj-C messaging style. We might want to consider adding the following methods for convenience:
- (TWLPromise *)then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler;
- (TWLPromise *)onContext:(TWLContext *)context then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler;
- (TWLPromise *)onContext:(TWLContext *)context token:(nullable TWLInvalidationToken *)token then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler;
- (TWLPromise *)then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler whenCancelled:(void (^)(void))cancelHandler;
- (TWLPromise *)onContext:(TWLContext *)context then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler whenCancelled:(void (^)(void))cancelHandler;
- (TWLPromise *)onContext:(TWLContext *)context token:(nullable TWLInvalidationToken *)token then:(void (^)(ValueType value))thenHandler catch:(void (^)(ErrorType error))catchHandler whenCancelled:(void (^)(void))cancelHandler;
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers