summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.deno_fetch.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/lib.deno_fetch.d.ts')
-rw-r--r--ext/fetch/lib.deno_fetch.d.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts
index 46a1cc399..de9277908 100644
--- a/ext/fetch/lib.deno_fetch.d.ts
+++ b/ext/fetch/lib.deno_fetch.d.ts
@@ -424,13 +424,15 @@ declare class Response implements Body {
text(): Promise<string>;
}
-/** Fetch a resource from the network. It returns a Promise that resolves to the
- * Response to that request, whether it is successful or not.
+/** Fetch a resource from the network. It returns a `Promise` that resolves to the
+ * `Response` to that `Request`, whether it is successful or not.
*
- * const response = await fetch("http://my.json.host/data.json");
- * console.log(response.status); // e.g. 200
- * console.log(response.statusText); // e.g. "OK"
- * const jsonData = await response.json();
+ * ```ts
+ * const response = await fetch("http://my.json.host/data.json");
+ * console.log(response.status); // e.g. 200
+ * console.log(response.statusText); // e.g. "OK"
+ * const jsonData = await response.json();
+ * ```
*/
declare function fetch(
input: Request | URL | string,