Skip to content

Commit

Permalink
docs: readTextFile / readTextFileSync throw when reading directory (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
vwkd committed Oct 19, 2020
1 parent e587637 commit e432db7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/dts/lib.deno.ns.d.ts
Expand Up @@ -1226,7 +1226,7 @@ declare namespace Deno {
export function rename(oldpath: string, newpath: string): Promise<void>;

/** 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");
Expand All @@ -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");
Expand Down

0 comments on commit e432db7

Please sign in to comment.