mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
fix jsDoc (#5992)
This commit is contained in:
parent
29db4104c4
commit
f0ba814a79
1 changed files with 6 additions and 3 deletions
9
cli/js/lib.deno.ns.d.ts
vendored
9
cli/js/lib.deno.ns.d.ts
vendored
|
@ -364,7 +364,7 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* let f = Deno.openSync("/etc/passwd");
|
* let f = Deno.openSync("/etc/passwd");
|
||||||
* for (const chunk of Deno.iterSync(reader)) {
|
* for (const chunk of Deno.iterSync(f)) {
|
||||||
* console.log(chunk);
|
* console.log(chunk);
|
||||||
* }
|
* }
|
||||||
* f.close();
|
* f.close();
|
||||||
|
@ -509,7 +509,7 @@ declare namespace Deno {
|
||||||
* ```ts
|
* ```ts
|
||||||
* const encoder = new TextEncoder();
|
* const encoder = new TextEncoder();
|
||||||
* const data = encoder.encode("Hello world");
|
* const data = encoder.encode("Hello world");
|
||||||
* const file = Deno.openSync("/foo/bar.txt");
|
* const file = Deno.openSync("/foo/bar.txt", {write: true});
|
||||||
* const bytesWritten = Deno.writeSync(file.rid, data); // 11
|
* const bytesWritten = Deno.writeSync(file.rid, data); // 11
|
||||||
* Deno.close(file.rid);
|
* Deno.close(file.rid);
|
||||||
* ```
|
* ```
|
||||||
|
@ -528,7 +528,7 @@ declare namespace Deno {
|
||||||
* ```ts
|
* ```ts
|
||||||
* const encoder = new TextEncoder();
|
* const encoder = new TextEncoder();
|
||||||
* const data = encoder.encode("Hello world");
|
* const data = encoder.encode("Hello world");
|
||||||
* const file = await Deno.open("/foo/bar.txt");
|
* const file = await Deno.open("/foo/bar.txt", { write: true });
|
||||||
* const bytesWritten = await Deno.write(file.rid, data); // 11
|
* const bytesWritten = await Deno.write(file.rid, data); // 11
|
||||||
* Deno.close(file.rid);
|
* Deno.close(file.rid);
|
||||||
* ```
|
* ```
|
||||||
|
@ -1366,6 +1366,7 @@ declare namespace Deno {
|
||||||
* points to.
|
* points to.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* import { assert } from "https://deno.land/std/testing/asserts.ts";
|
||||||
* const fileInfo = await Deno.lstat("hello.txt");
|
* const fileInfo = await Deno.lstat("hello.txt");
|
||||||
* assert(fileInfo.isFile);
|
* assert(fileInfo.isFile);
|
||||||
* ```
|
* ```
|
||||||
|
@ -1389,6 +1390,7 @@ declare namespace Deno {
|
||||||
* follow symlinks.
|
* follow symlinks.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* import { assert } from "https://deno.land/std/testing/asserts.ts";
|
||||||
* const fileInfo = await Deno.stat("hello.txt");
|
* const fileInfo = await Deno.stat("hello.txt");
|
||||||
* assert(fileInfo.isFile);
|
* assert(fileInfo.isFile);
|
||||||
* ```
|
* ```
|
||||||
|
@ -1400,6 +1402,7 @@ declare namespace Deno {
|
||||||
* always follow symlinks.
|
* always follow symlinks.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
* import { assert } from "https://deno.land/std/testing/asserts.ts";
|
||||||
* const fileInfo = Deno.statSync("hello.txt");
|
* const fileInfo = Deno.statSync("hello.txt");
|
||||||
* assert(fileInfo.isFile);
|
* assert(fileInfo.isFile);
|
||||||
* ```
|
* ```
|
||||||
|
|
Loading…
Add table
Reference in a new issue