import { type PublicMethod, type PublicMethodWithTarget, type Options, type AnyTarget, type PageTarget } from "./types.js"; import { type Promisable, type SetReturnType } from "type-fest"; export declare const errorTargetClosedEarly = "The target was closed before receiving a response"; export declare const errorTabDoesntExist = "The tab doesn't exist"; export declare const errorTabWasDiscarded = "The tab was discarded"; declare function messenger(type: Type, options: { isNotification: true; }, target: AnyTarget, ...args: Parameters): void; declare function messenger>>(type: Type, options: Options, target: AnyTarget, ...args: Parameters): ReturnValue; declare function getMethod>(type: Type, target: Promisable): PublicMethodType; declare function getMethod>(type: Type): PublicMethodWithDynamicTarget; declare function getNotifier, void>>(type: Type, target: Promisable): PublicMethodType; declare function getNotifier, void>>(type: Type): PublicMethodWithDynamicTarget; export { messenger, getMethod, getNotifier }; export declare const backgroundTarget: PageTarget;