rxjs
Version:
Reactive Extensions for modern JavaScript
9 lines (7 loc) • 462 B
text/typescript
import { SchedulerLike, ReadableStreamLike } from '../types';
import { Observable } from '../Observable';
import { scheduleAsyncIterable } from './scheduleAsyncIterable';
import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';
export function scheduleReadableStreamLike<T>(input: ReadableStreamLike<T>, scheduler: SchedulerLike): Observable<T> {
return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
}