diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-22 16:00:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-22 22:00:48 +0200 |
commit | e26c2cd7c8d1bb1799ee6a1a850b8b5fc5e1ed83 (patch) | |
tree | 67e07d2ff7b9b98f6a74d8abefb20c4b3dedeaec /cli/js/lib.deno.ns.d.ts | |
parent | 68d287eed5dcdc7b84a317fa90c4c9131389c0b8 (diff) |
Add comments in Reader/SyncReader about iter/iterSync (#4852)
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r-- | cli/js/lib.deno.ns.d.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index ed2e40f84..da9a0ec93 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -446,7 +446,6 @@ declare namespace Deno { SEEK_END = 2, } - /** **UNSTABLE**: might make `Reader` into iterator of some sort. */ 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 @@ -465,6 +464,8 @@ declare namespace Deno { * after reading some bytes and also both of the allowed EOF behaviors. * * Implementations should not retain a reference to `p`. + * + * Use Deno.iter() to turn a Reader into an AsyncIterator. */ read(p: Uint8Array): Promise<number | EOF>; } @@ -487,6 +488,8 @@ declare namespace Deno { * after reading some bytes and also both of the allowed EOF behaviors. * * Implementations should not retain a reference to `p`. + * + * Use Deno.iterSync() to turn a SyncReader into an Iterator. */ readSync(p: Uint8Array): number | EOF; } |