import { type Ref } from "./invoke.js";
/**
 * Extract the memory references from the given ToDesktop Ref object and tell
 * the main process to release them.
 */
export declare function releaseMemoryBindings(ref: Ref): Promise<void>;
/**
 * Retrieve an object reference from the main process.
 */
export declare function retrieve({ id, }: {
    id: string;
}): Promise<Ref | undefined>;
/**
 * Subscribe to an event.
 *
 * @param event - The name of the event to subscribe to.
 * @param callback - The function to be invoked when this event is triggered.
 * @returns A callback for unsubscribing from the event.
 * @public
 */
export declare function on(event: string, callback: (event: string) => void): Promise<() => void>;
