import { AsyncIterableX } from '../../asynciterable/asynciterablex.js'; import { takeWhile } from '../../asynciterable/operators/takewhile.js'; /** * @ignore */ export function takeWhileProto( this: AsyncIterableX, predicate: (value: T, index: number, signal?: AbortSignal) => value is S ): AsyncIterableX; export function takeWhileProto( this: AsyncIterableX, predicate: (value: T, index: number, signal?: AbortSignal) => boolean | Promise ): AsyncIterableX; export function takeWhileProto( this: AsyncIterableX, predicate: (value: T, index: number, signal?: AbortSignal) => boolean | Promise ): AsyncIterableX { return takeWhile(predicate)(this); } AsyncIterableX.prototype.takeWhile = takeWhileProto; declare module '../../asynciterable/asynciterablex' { interface AsyncIterableX { takeWhile: typeof takeWhileProto; } }