declare const SerializedFunctionTag: unique symbol;
type AnyFunction = (...args: any) => any;
export type SerializedFunction<T extends AnyFunction> = MessagePort & {
    readonly [SerializedFunctionTag]: T;
};
type SerializedFunctionReturnType<T extends AnyFunction> = Awaited<ReturnType<T>>;
export type DeserializedFunction<T extends AnyFunction> = (...args: Parameters<T>) => Promise<SerializedFunctionReturnType<T>>;
export declare function isSerializedFunction(value: any): value is SerializedFunction<AnyFunction>;
export declare function serializeFunction<T extends AnyFunction>(func: T): SerializedFunction<T>;
export declare function deserializeFunction<T extends AnyFunction>(serializedFunction: SerializedFunction<T>): DeserializedFunction<T>;
export {};
//# sourceMappingURL=function-serialization.d.ts.map