summaryrefslogtreecommitdiff
path: root/cli/js/io.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/io.ts')
-rw-r--r--cli/js/io.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/js/io.ts b/cli/js/io.ts
index 15a4ad09b..4ca5289d1 100644
--- a/cli/js/io.ts
+++ b/cli/js/io.ts
@@ -18,12 +18,14 @@ export enum SeekMode {
// https://golang.org/pkg/io/#Reader
export interface Reader {
/** Reads up to p.byteLength bytes into `p`. It resolves to the number
- * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error encountered.
+ * of bytes read (`0` <= `n` <= `p.byteLength`) and rejects if any error encountered.
* Even if `read()` returns `n` < `p.byteLength`, it may use all of `p` as
* scratch space during the call. If some data is available but not
* `p.byteLength` bytes, `read()` conventionally returns what is available
* instead of waiting for more.
*
+ * When `p.byteLength` == `0`, `read()` returns `0` and has no other effects.
+ *
* When `read()` encounters end-of-file condition, it returns EOF symbol.
*
* When `read()` encounters an error, it rejects with an error.