source: frontend/node_modules/workbox-core/copyResponse.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.0 KB
Line 
1import './_version.js';
2/**
3 * Allows developers to copy a response and modify its `headers`, `status`,
4 * or `statusText` values (the values settable via a
5 * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}
6 * object in the constructor).
7 * To modify these values, pass a function as the second argument. That
8 * function will be invoked with a single object with the response properties
9 * `{headers, status, statusText}`. The return value of this function will
10 * be used as the `ResponseInit` for the new `Response`. To change the values
11 * either modify the passed parameter(s) and return it, or return a totally
12 * new object.
13 *
14 * This method is intentionally limited to same-origin responses, regardless of
15 * whether CORS was used or not.
16 *
17 * @param {Response} response
18 * @param {Function} modifier
19 * @memberof workbox-core
20 */
21declare function copyResponse(response: Response, modifier?: (responseInit: ResponseInit) => ResponseInit): Promise<Response>;
22export { copyResponse };
Note: See TracBrowser for help on using the repository browser.