import type { Awaitable } from "./Awaitable";
/**
 * Takes elements from the stream while the predicate returns true.
 * Stops and terminates the stream when the predicate returns false.
 *
 * @param fn Predicate function that determines whether to continue taking elements
 * @returns A TransformStream that takes elements while the predicate is true
 * @template T The type of the input/output stream
 * @example
 * sflow([1, 2, 3, 4, 5])
 *   .takeWhile(x => x < 4)
 *   .toArray() // [1, 2, 3]
 */
export declare function takeWhiles<T>(fn: (x: T, i: number) => Awaitable<unknown>, { terminate }?: {
    terminate?: boolean | undefined;
}): TransformStream<T, T>;
//# sourceMappingURL=takeWhiles.d.ts.map