Skip to content

Commit

Permalink
chore(ext/fetch): render jsdoc code example properly (#13656)
Browse files Browse the repository at this point in the history
  • Loading branch information
GJZwiers authored Feb 12, 2022
1 parent 65de5fb commit 911ddbc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ext/fetch/lib.deno_fetch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 911ddbc

Please sign in to comment.