mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
chore(ext/fetch): render jsdoc code example properly (#13656)
This commit is contained in:
parent
65de5fb465
commit
911ddbc733
1 changed files with 8 additions and 6 deletions
6
ext/fetch/lib.deno_fetch.d.ts
vendored
6
ext/fetch/lib.deno_fetch.d.ts
vendored
|
@ -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.
|
||||
*
|
||||
* ```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,
|
||||
|
|
Loading…
Reference in a new issue