import type { Subscribable } from '../types/inputs/Subscribable.js'; import type { Unsubscribable } from '../types/inputs/Unsubscribable.js'; import type { StrictObserver } from '../types/outputs/StrictObserver.js'; import type { Subscription } from '../types/outputs/Subscription.js'; export interface SubscriptionProps { /** * Called to close subscription (unsubscribe call or dispose). */ readonly onUnsubscribe: () => void; /** * Getter to know if subscription is closed. */ readonly isClosed: () => boolean; } /** * Builds a subscription object. */ export declare function buildSubscription({ onUnsubscribe, isClosed }: SubscriptionProps): Subscription; /** * Subscribes to given observer, bounded to a signal. */ export declare function boundedSubscription(observable: Subscribable, signal: AbortSignal, observer: StrictObserver): Subscription; /** * Wraps an Unsubscribable object into a Subscription * @param unsub */ export declare function wrapUnsubscribable(unsub: Unsubscribable): Subscription;