import type { JsMsg, Msg, NatsSubscribeOptions } from './nats'; export interface UseNatsSubscriptionOptions extends NatsSubscribeOptions { enabled?: boolean; } export interface UseNatsSubscriptionReturn { isSubscribed: boolean; isReady: boolean; } /** * Subscribe to a NATS subject using the shared connection from . * Automatically (re)subscribes when the connection becomes ready, when the * subject changes, and after reconnections. */ export declare function useNatsSubscription(subject: string | null, onMessage: (msg: Msg) => void | Promise, options?: UseNatsSubscriptionOptions): UseNatsSubscriptionReturn; export type UseNatsJsonSubscriptionOptions = UseNatsSubscriptionOptions; export declare function useNatsJsonSubscription(subject: string | null, onPayload: (payload: T, msg: Msg) => void | Promise, options?: UseNatsJsonSubscriptionOptions): UseNatsSubscriptionReturn; export type NatsJsMsg = JsMsg; //# sourceMappingURL=use-nats-subscription.d.ts.map