forked from vultix/ts-results
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the AsyncResult.andThen handling of known-Ok transformations (#189)
Without these overloads goodResult.andThen((value) => Promise.resolve(Ok(value * 2))); was of type AsyncResult<number, unknown> which would cause downstream problems in the client code. Granted, this could be an edge case and the map method could be better for this (Ok -> Ok transformation so only the value inside changes) but still, I don't think we should be generating unknown here, hence the patch. Resolves: #176
- Loading branch information
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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