-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Handy to do:
findUser(userId)
.chain(rejectIf(x => !x.length, new UserNotFoundError(userId))) Note: as the predicate is sync, it would be dangerous as you can pass a predicate to a Task<boolean, E> that will actually always be cast to true and the type system will not warn you. We should force the predicate - via typings - to be a sync predicate (a function to a boolean value).
We could also make another version for "tasked" predicates.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request