fix(deps): update dependency typescript-result to 3.5 #8
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1->3.5Release Notes
everweij/typescript-result (typescript-result)
v3.5.2: 3.5.2Compare Source
Fixes
Result.tryandResult.fromAsyncCatchingnow catch exceptions that are thrown inside the transform-error callbacks.Thanks @PeterD1524 !
v3.5.1: 3.5.1Compare Source
Fixes
{ value: string }.v3.5.0: 3.5.0Compare Source
Minor changes:
Adds
match()toResult, introducing basic pattern matching to the lib. See docs for more info about this feature.Adds
okproperty onResultas the main way to check whether a result is a success or failure. See updated docs. This makes error handling a bit simpler, and allows us to more easily use a result with a pattern-matching lib likets-pattern. As a result,isOk()andisError()are marked for deprecation.Strings passed to
Result.errorare now constant:v3.4.1: 3.4.1Compare Source
Fixes:
@internalannotation, the generator syntax (yield*, etc) wasn't working correctly. Removing the annotations on[Symbol.iterator]()solved the issue.v3.4.0: 3.4.0Compare Source
Minor Changes
Result.Ok/Result.Errorwhen usingResult.isOk()andResult.isError().Fixes
v3.3.0: 3.3.0Compare Source
Minor changes
transformErrorFncallback toResult.wrapv3.2.0: 3.2.0Compare Source
Minor Changes
Result.fromAsyncnow also takes a callback functionInstead of only accepting a promise, you can use a callback function to create an
AsyncResultinstance:This functionality is mainly a replacement for having to wrap the return of a function call in
Result.fromAsyncfirst, before being able to do any chaining. By using the callback variant ofResult.fromAsync, the responsibility of transforming the async operation into anAsyncResultshifts from the consuming code to the source. Either way is fine, so it's mainly a matter of preference.Result.recoverCatchingandAsyncResult.recoverCatchingnow both have an optionaltransformErrorcallbackSimilar to what
Result.mapCatchingandAsyncResult.mapCatchingalready had, you can now transform any caught exceptions into a custom error:Various improvements of types
Most notable are complex union types that now get merged into a single
ResultorAsyncResult:Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.