diff options
Diffstat (limited to 'cli/js')
-rw-r--r-- | cli/js/lib.deno.ns.d.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index 8c91f145e..931d46455 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -1031,9 +1031,8 @@ declare namespace Deno { /** Asynchronously reads and returns the entire contents of a file as a utf8 * encoded string. Reading a directory returns an empty data array. * - * const decoder = new TextDecoder("utf-8"); - * const data = Deno.readFileSync("hello.txt"); - * console.log(decoder.decode(data)); + * const data = await Deno.readTextFile("hello.txt"); + * console.log(data); * * Requires `allow-read` permission. */ export function readTextFile(path: string): Promise<string>; |