import { UntypedConnectorKind, ConnectorPlatform, ScriptContext, RequestArgument, InitChannelData, SuccessResponse } from './types.cjs'; type SetupClientChannelParams = { appId: string; connectorPlatform: ConnectorPlatform; currentContext: ScriptContext; targetContext: ScriptContext; eventHandler: (kind: ConnectorKind | undefined, method: string, args: any[]) => Promise; sendPortPostMessage: (message: unknown, transfer: Transferable[]) => void; onBeforeFirstSend?: () => Promise; onBeforeRequest?: (args: { connectorKind: null | ConnectorKind; method: string; args: RequestArgument[]; }) => unknown; initChannelData?: InitChannelData; }; declare const setupClientChannel: ({ appId, connectorPlatform, currentContext, targetContext, eventHandler, sendPortPostMessage, onBeforeFirstSend, onBeforeRequest, initChannelData, }: SetupClientChannelParams) => (connectorKind: null | ConnectorKind) => (method: string, args: RequestArgument[]) => Promise; export { setupClientChannel };