summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-04-06 00:05:55 +0200
committerGitHub <noreply@github.com>2021-04-06 00:05:55 +0200
commitd849c87eb16a4bebee1a09c171dbdae6a4924a55 (patch)
treeaaf380e4ea5ba75a448c8194f1d027e900d5da1f /cli/dts/lib.deno.ns.d.ts
parentda60e2afcbd4b28e3b8ba69b5e38d4ff173ddbe1 (diff)
chore: deprecate Deno.iter and Deno.iterSync (#10025)
This commit marks the `Deno.iter` and `Deno.iterSync` utils as deprecated, and schedules them for removal in Deno 2.0. These utilities are implemented in pure JS, so should not be part of the Deno namespace. These utilities are now available in std/io/util: denoland/deno_std#843.
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 1592ee5b2..4934c642d 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -312,7 +312,8 @@ declare namespace Deno {
*
* Implementations should not retain a reference to `p`.
*
- * Use Deno.iter() to turn a Reader into an AsyncIterator.
+ * Use iter() from https://deno.land/std/io/util.ts to turn a Reader into an
+ * AsyncIterator.
*/
read(p: Uint8Array): Promise<number | null>;
}
@@ -336,7 +337,8 @@ declare namespace Deno {
*
* Implementations should not retain a reference to `p`.
*
- * Use Deno.iterSync() to turn a ReaderSync into an Iterator.
+ * Use iterSync() from https://deno.land/std/io/util.ts to turn a ReaderSync
+ * into an Iterator.
*/
readSync(p: Uint8Array): number | null;
}
@@ -422,7 +424,10 @@ declare namespace Deno {
},
): Promise<number>;
- /** Turns a Reader, `r`, into an async iterator.
+ /**
+ * @deprecated Use iter from https://deno.land/std/io/util.ts instead. Deno.iter will be removed in Deno 2.0.
+ *
+ * Turns a Reader, `r`, into an async iterator.
*
* ```ts
* let f = await Deno.open("/etc/passwd");
@@ -458,7 +463,10 @@ declare namespace Deno {
},
): AsyncIterableIterator<Uint8Array>;
- /** Turns a ReaderSync, `r`, into an iterator.
+ /**
+ * @deprecated Use iterSync from https://deno.land/std/io/util.ts instead. Deno.iterSync will be removed in Deno 2.0.
+ *
+ * Turns a ReaderSync, `r`, into an iterator.
*
* ```ts
* let f = Deno.openSync("/etc/passwd");