Skip to content

Commit 5e52964

Browse files
mcanshMichaelDeBoey
authored andcommitted
chore: make Response.json generic
Signed-off-by: Logan McAnsh <[email protected]>
1 parent e120b80 commit 5e52964

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/fetch/src/response.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ export default class Response extends Body {
127127
}
128128

129129
/**
130-
* @param {any} data The URL that the new response is to originate from.
130+
* @template {unknown} Data
131+
* @param {Data} data The URL that the new response is to originate from.
131132
* @param {ResponseInit} [responseInit] An optional status code for the response (e.g., 302.)
132-
* @returns {Response} A Response object.
133+
* @returns {Promise<Data>} A Response object.
133134
*/
134135
static json(data, responseInit = {}) {
135136
let headers = new Headers(responseInit.headers);

0 commit comments

Comments
 (0)