import type { ExposedObject } from './handlers'; declare const release: unique symbol; export declare const Symbols: { readonly release: typeof release; }; interface RemoteObjectAPI { [Symbols.release](): Promise; } declare type Promisify = T extends Promise ? T : Promise; declare type Unpromisify = T extends Promise ? P : T; declare type RemoteProperty = T extends Function | ExposedObject ? Remote : Promisify; declare type LocalProperty = T extends Function | ExposedObject ? Local : Unpromisify; declare type RemoteObject = { [P in keyof T]: RemoteProperty; }; declare type LocalObject = { [P in keyof T]: LocalProperty; }; declare type ProxyOrClone = T extends ExposedObject ? Remote : T; declare type UnproxyOrClone = T extends RemoteObject> ? Local : T; export declare type Remote = RemoteObject & (T extends (...args: infer TArguments) => infer TReturn ? (...args: { [I in keyof TArguments]: UnproxyOrClone; }) => Promisify>> : unknown) & (T extends new (...args: infer TArguments) => infer TInstance ? new (...args: { [I in keyof TArguments]: UnproxyOrClone; }) => Promisify> : unknown) & RemoteObjectAPI; export declare type Local = Omit, keyof RemoteObjectAPI> & (T extends (...args: infer TArguments) => infer TReturn ? (...args: { [I in keyof TArguments]: ProxyOrClone; }) => MaybePromise>> : unknown) & (T extends new (...args: infer TArguments) => infer TInstance ? new (...args: { [I in keyof TArguments]: ProxyOrClone; }) => MaybePromise>> : unknown); /** * Expresses that a type can be either a sync or async. */ declare type MaybePromise = Promise | T; export {}; //# sourceMappingURL=types.d.ts.map