# until

```ts
function until<T>(promise: PromiseLike<T>): Operation<T>
```

Treat a promise as an [Operation](https://frontside.com/effection/api/v4/Operation.md)

### Examples
#### Example 1
```js
let response = yield* until(fetch('https://google.com'));
```
---
### Type Parameters
T


### Parameters


**promise**: PromiseLike&lt;T&gt;
### Return Type


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


that succeeds or fails depending on the outcome of `promise`

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