concatenate.d.ts 796 B

1234567891011121314151617181920
  1. import { StreamSource } from './_types.js';
  2. import './_version.js';
  3. /**
  4. * Takes multiple source Promises, each of which could resolve to a Response, a
  5. * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit).
  6. *
  7. * Returns an object exposing a ReadableStream with each individual stream's
  8. * data returned in sequence, along with a Promise which signals when the
  9. * stream is finished (useful for passing to a FetchEvent's waitUntil()).
  10. *
  11. * @param {Array<Promise<module:workbox-streams.StreamSource>>} sourcePromises
  12. * @return {Object<{done: Promise, stream: ReadableStream}>}
  13. *
  14. * @memberof module:workbox-streams
  15. */
  16. declare function concatenate(sourcePromises: Promise<StreamSource>[]): {
  17. done: Promise<void>;
  18. stream: ReadableStream;
  19. };
  20. export { concatenate };