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

switchMap

import { switchMap } from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/index.ts";

Converts each emitted item to an observable, producing values only from the most recent observable in the sequence.

function switchMap<T, S>(f: (v: T) => Observable<S>): Transform<T, S>;
§
switchMap<T, S>(f: (v: T) => Observable<S>): Transform<T, S>
[src]

§Type Parameters

§Parameters

§
f: (v: T) => Observable<S>
[src]

§Return Type

§

Transform that emits items from the most recent observable created by projecting values from the outer observable.