import { DispatchMsg } from './create_dispatch_fn.js'; import { TransportClient } from '../transport_client.js'; import { TransferDescriptor } from '../interface/transferable.js'; declare type FilterOutAttributes = { [Key in keyof Base]: Base[Key] extends (...any: any[]) => any ? Base[Key] : never; }; declare type PromisifyFunction any> = (...args: Parameters) => Promise>; declare type Promisify any; }> = { [Key in keyof Base]: ReturnType extends Promise ? Base[Key] : PromisifyFunction; }; declare type TransferTypes = { [Index in keyof Tuple]: Tuple[Index] | (Tuple[Index] extends Transferable ? TransferDescriptor : never); }; /** * Annoying: https://github.com/microsoft/TypeScript/issues/29919 * There's a bug that means we can't map over the tuple or function parameter types to make them transferrable, if * we use the Parameters builtin, and then try to map. * So instead we inline the Parameters builtin and apply the TransferTypes to the parameters within the inline. * Once the above is fixed we could in theory just do: * * type MakeFunctionTransferrable any> = ( * ...args: TransferTypes> * ) => ReturnType; */ declare type MakeFunctionTransferrable any> = (...args: TFunction extends (...args: infer P) => any ? TransferTypes

: never) => ReturnType; declare type Transferrable any; }> = { [Key in keyof Base]: MakeFunctionTransferrable; }; export declare type Proxify = Promisify>>; export declare function createDispatchProxyFromFn(class_: { new (...args: any[]): T; }, requestFn: (fn: string) => (...args: any[]) => Promise): Proxify; export declare function createDispatchProxy(class_: { new (...args: any[]): T; }, transportClient: TransportClient): Proxify; export {}; //# sourceMappingURL=create_dispatch_proxy.d.ts.map