export { pumpClientProducerToChannel }; import type { ChannelTransports } from '../../constants.js'; import type { StreamingProducer } from '../../types.js'; /** * Pump a single producer's chunks to the server through a dedicated ClientChannel. * * Creates the channel, starts the pump, and returns the channel so the caller * can register it for abort handling. * * The pump races `cancelledPromise` against `producer.chunks.next()` so that * channel close / abort breaks the loop immediately. * * On abort: the abort error propagates through the race (reject, not resolve), * so the catch block sees it. On clean close: resolves with `{ done: true }`. */ declare function pumpClientProducerToChannel(createProducer: () => StreamingProducer, channelTransports: ChannelTransports, telefuncUrl: string, connectionKey?: string, headers?: Record): { metadata: { channelId: string; }; close(): Promise; abort(): void; };