From e432db70e9b5628990517baa689b74721f6da8e1 Mon Sep 17 00:00:00 2001 From: vwkd <33468089+vwkd@users.noreply.github.com> Date: Mon, 19 Oct 2020 15:06:04 +0200 Subject: [PATCH] docs: readTextFile / readTextFileSync throw when reading directory (#7999) --- cli/dts/lib.deno.ns.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 0b9876865e..d33eb8a0b9 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -1226,7 +1226,7 @@ declare namespace Deno { export function rename(oldpath: string, newpath: string): Promise; /** Synchronously reads and returns the entire contents of a file as utf8 - * encoded string. Reading a directory returns an empty string. + * encoded string. Reading a directory throws an error. * * ```ts * const data = Deno.readTextFileSync("hello.txt"); @@ -1237,7 +1237,7 @@ declare namespace Deno { export function readTextFileSync(path: string | URL): string; /** Asynchronously reads and returns the entire contents of a file as utf8 - * encoded string. Reading a directory returns an empty string. + * encoded string. Reading a directory throws an error. * * ```ts * const data = await Deno.readTextFile("hello.txt");