UNPKG

@apollo/client-react-streaming

Version:

This package provides building blocks to create framework-level integration of Apollo Client with React's streaming SSR. See the [@apollo/client-integration-nextjs](https://github.com/apollographql/apollo-client-integrations/tree/main/packages/nextjs) pac

18 lines 708 B
/** * Creates a callback with backpressure support. * * New calls can be made with `callback.push(value)`. * If a callback is already registered, it will be called directly. * Otherwise, the calls will be queued until a callback is registered, * at which point all queued calls will be executed. * * The callback can be registered with `callback.register(callback)`. * * Registering `null` as a callback will clear the current callback - * future calls after that will be queued again. */ export declare function createBackpressuredCallback<T>(): { push: (value: T) => void; register: (callback: null | ((value: T) => void)) => void; }; //# sourceMappingURL=backpressuredCallback.d.ts.map