import { AsyncIterableX } from '../../asynciterable/asynciterablex.js'; import { switchMap } from '../../asynciterable/operators/switchmap.js'; /** * @ignore */ export function switchMapProto>( this: AsyncIterableX, selector: (value: T, index: number, signal?: AbortSignal) => R | Promise, thisArg?: any ) { return switchMap(selector, thisArg)(this); } AsyncIterableX.prototype.switchMap = switchMapProto; declare module '../../asynciterable/asynciterablex' { interface AsyncIterableX { switchMap: typeof switchMapProto; } }