import { syncIterator } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.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.
Parameters
src: AsyncIterable<T>