# all

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

Block and wait for all of the given operations to complete. Returns
an array of values that the given operations evaluated to. This has
the same purpose as
[Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).

If any of the operations become errored, then `all` will also become errored.

### Examples
#### Example 1
``` javascript
import { all, expect, main } from 'effection';

await main(function*() {
 let [google, bing] = yield* all([
   expect(fetch('http://google.com')),
   expect(fetch('http://bing.com')),
  ]);
 // ...
});
```

---
### Type Parameters
T extends readonly [Operation](https://frontside.com/effection/api/v4/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/Operation.md)&lt;All&lt;T&gt;&gt;


the list of values that the operations evaluate to, in the order they were given

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