This project has been succeeded by GraphReFly. New development happens at graphrefly-ts. npm install @graphrefly/graphrefly
Skip to content

rawFromAsyncIter() ​

Converts an AsyncIterable<T> (or factory) into a raw callbag source. Emits each yielded value as DATA, then END on completion.

Factory form () => AsyncIterable<T> creates a fresh iterator per subscriber — use for resubscribable sources.

Signature ​

ts
function rawFromAsyncIter<T>(
	iterableOrFactory: AsyncIterable<T> | (() => AsyncIterable<T>),
): CallbagSource

Parameters ​

ParameterTypeDescription
iterableOrFactory`AsyncIterable<T>(() => AsyncIterable<T>)`

Returns ​

A raw callbag source function.

Released under the MIT License.