try-typescript
Advanced tools
Comparing version
{ | ||
"name": "try-typescript", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "This repository implements a Try class inspired by the Vavr library in Java. The Try class is a functional programming construct for handling computations that may succeed or fail. It encapsulates exceptions and streamlines error handling, reducing boilerplate code and enhancing code readability. ", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -37,2 +37,3 @@ # Try-Typescript | ||
### `combine<T extends any[], R>(...args: [...{ [K in keyof T]: Try<T[K]> }, (...values: T) => R]): Try<R>` | ||
Sometimes you may want to combine multiple Try instances into one. This function allows you to do that. It takes multiple Try instances and a function that will be executed if all Try instances are successful. If one of the Try instances is a failure, the function will not be executed and the resulting Try instance will be a failure. <br> | ||
```typescript | ||
@@ -39,0 +40,0 @@ //All passed Try instances are successful |
41264
0.84%387
0.26%