# allSettled

```ts
function* allSettled<T extends readonly Operation<unknown>[] | []>(ops: T): Operation<AllSettled<T>>
```

Block and wait for all of the given operations to settle. Returns
an array of results indicating whether each operation succeeded or
errored. This has the same purpose as
[Promise.allSettled](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled).

Unlike [all](https://frontside.com/effection/api/v4-next/all.md), `allSettled` never rejects — every operation
result is represented as either `{ ok: true, value }` or
`{ ok: false, error }`.

### Example

``` javascript
import { allSettled, main, until } from 'effection';

await main(function*() {
 let [google, notASite] = yield* allSettled([
   until(fetch('http://google.com')),
   until(fetch('http://nope.example')),
  ]);
 // google => { ok: true, value: Response }
 // notASite => { ok: false, error: Error }
});
```

### Type Parameters
T extends readonly [Operation](https://frontside.com/effection/api/v4-next/Operation.md)&lt;unknown&gt;&lbrack;&rbrack; | &lbrack;&rbrack;


### Parameters


**ops**: T


a list of operations to wait for
### Return Type


[Operation](https://frontside.com/effection/api/v4-next/Operation.md)&lt;AllSettled&lt;T&gt;&gt;


the list of settled results, in the order they were given

[View code](https://github.com/thefrontside/effection/tree/effection-v4.2.0/lib/all-settled.ts#L35)
