import { SDKEvents } from '@fanfare-io/fanfare-sdk-core/events'; type SDKEventKey = keyof SDKEvents; /** * Subscribe to a typed Fanfare SDK event for the lifetime of the owning scope. * * The SDK instance, the event name and the handler are all captured once at * setup: the subscription is not re-established if the provider later swaps the * SDK instance, `event` is read as a plain value rather than an accessor, and * the handler passed on the first call is the one invoked for every delivery — * unlike the React adapter, which reads its handler from a ref refreshed each * render. Read reactive values inside the handler body, and call the hook again * from a fresh scope to listen for a different event. * * The subscription attaches inside a `createEffect`, so events emitted between * the hook call and the effect flush are not delivered, and under the server * build — where effects never run — the hook is a no-op. */ export declare function useSdkEvent(event: K, handler: (data: SDKEvents[K]) => void): void; export {};