Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

syncIterator

import { syncIterator } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";

syncIterator is a utility function that allows an AsyncIterator to be triggered by calling next() - the utility will yield null if the underlying iterator is closed. Note it is possibly an error to call use this function on an AsyncIterable that has already been started (Symbol.asyncIterator() has been called) from a looping construct.

function syncIterator<T>(src: AsyncIterable<T>): SyncIterator<T>;
§
syncIterator<T>(src: AsyncIterable<T>): SyncIterator<T>
[src]

§Type Parameters

§Parameters

§
src: AsyncIterable<T>
[src]

§Return Type