# Subscription

```ts
interface Subscription<T, R>
```

The Effection equivalent of an [`AsyncIterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncIterator)

A subscription acts like a stateful queue that provides a sequence of values
via the next() method. Normally a subscription is created via a
[Stream](https://frontside.com/effection/api/v3/Stream.md).



### Type Parameters
T


R


### Methods
<dl>
<dt class="border-dotted [&:not(:first-child)]:border-t-2 [&:not(:first-child)]:pt-3 [&:not(:first-child)]:mt-2"><h4 id="next" class="inline scroll-mt-[100px]">next</h4>(): [Operation](https://frontside.com/effection/api/v3/Operation.md)&lt;IteratorResult&lt;T, R&gt;&gt;</dt>
<dd class="flex flex-col [&>pre]:mb-3 [&>p:not(:first-child)]:mt-0" >
*No documentation available.*
</dd>
</dl>


### See
* https://effection.deno.dev/docs/collections#subscription

[View code](https://github.com/thefrontside/effection/tree/effection-v3.6.1/lib/types.ts#L265)
