summaryrefslogtreecommitdiff
path: root/js/files.ts
diff options
context:
space:
mode:
author迷渡 <justjavac@gmail.com>2019-04-04 17:34:00 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-04-04 05:34:00 -0400
commit4520e5812e112dfb219f8eb6051ed8576141165a (patch)
treecc109717fb8bf94c57f1b950620e86ffb3e1279a /js/files.ts
parent0e7311e1717edd312d371148f331fb558d9bcc4b (diff)
fix code bug in jsdocs (#2048)
Diffstat (limited to 'js/files.ts')
-rw-r--r--js/files.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/files.ts b/js/files.ts
index 4c1292bd7..0724565e4 100644
--- a/js/files.ts
+++ b/js/files.ts
@@ -87,7 +87,7 @@ function resRead(baseRes: null | msg.Base): ReadResult {
* const file = Deno.openSync("/foo/bar.txt");
* const buf = new Uint8Array(100);
* const { nread, eof } = Deno.readSync(file.rid, buf);
- * const text = new TextDecoder.decode(buf);
+ * const text = new TextDecoder().decode(buf);
*
*/
export function readSync(rid: number, p: Uint8Array): ReadResult {
@@ -102,7 +102,7 @@ export function readSync(rid: number, p: Uint8Array): ReadResult {
* const file = await Deno.open("/foo/bar.txt");
* const buf = new Uint8Array(100);
* const { nread, eof } = await Deno.read(file.rid, buf);
- * const text = new TextDecoder.decode(buf);
+ * const text = new TextDecoder().decode(buf);
* })();
*/
export async function read(rid: number, p: Uint8Array): Promise<ReadResult> {