import { type FromPromiseObservable } from '../types/index.mjs';
/**
* Creates an observable from a Promise factory that receives an `AbortSignal`.
* When the observable is completed (e.g., by `switchMap` switching to a new
* inner observable), the `AbortController` is automatically aborted, cancelling
* the in-flight request.
*
* Emits `Result.ok(value)` when the promise resolves, or `Result.err(error)`
* when it rejects. Rejections caused by abort (`AbortError`) are silently
* ignored and do not emit.
*
* @template A - The type of the resolved value
* @template E - The type of the error (excluding AbortError)
* @param factory - A function that receives an `AbortSignal` and returns a Promise
* @returns An observable that emits the promise result
*
* @example
* ```ts
* const results$ = query.pipe(
* switchMap((q) =>
* fromAbortablePromise((signal) =>
* fetch(`/api/search?q=${q}`, { signal }).then((r) => r.json()),
* ),
* ),
* );
* ```
*/
export declare const fromAbortablePromise: (factory: (signal: AbortSignal) => Promise) => FromPromiseObservable;
//# sourceMappingURL=from-abortable-promise.d.mts.map