diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2020-07-14 15:24:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 15:24:17 -0400 |
commit | cde4dbb35132848ffece59ef9cfaccff32347124 (patch) | |
tree | cc7830968c6decde704c8cfb83c9185193dc698f /std/node/_fs/_fs_readFile.ts | |
parent | 9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff) |
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/node/_fs/_fs_readFile.ts')
-rw-r--r-- | std/node/_fs/_fs_readFile.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/std/node/_fs/_fs_readFile.ts b/std/node/_fs/_fs_readFile.ts index 39c3d8393..2aef28290 100644 --- a/std/node/_fs/_fs_readFile.ts +++ b/std/node/_fs/_fs_readFile.ts @@ -14,11 +14,11 @@ import { fromFileUrl } from "../path.ts"; function maybeDecode(data: Uint8Array, encoding: TextEncodings): string; function maybeDecode( data: Uint8Array, - encoding: BinaryEncodings | null + encoding: BinaryEncodings | null, ): Buffer; function maybeDecode( data: Uint8Array, - encoding: Encodings | null + encoding: Encodings | null, ): string | Buffer { const buffer = new Buffer(data.buffer, data.byteOffset, data.byteLength); if (encoding && encoding !== "binary") return buffer.toString(encoding); @@ -33,23 +33,23 @@ type Callback = TextCallback | BinaryCallback | GenericCallback; export function readFile( path: string | URL, options: TextOptionsArgument, - callback: TextCallback + callback: TextCallback, ): void; export function readFile( path: string | URL, options: BinaryOptionsArgument, - callback: BinaryCallback + callback: BinaryCallback, ): void; export function readFile( path: string | URL, options: null | undefined | FileOptionsArgument, - callback: BinaryCallback + callback: BinaryCallback, ): void; export function readFile(path: string | URL, callback: BinaryCallback): void; export function readFile( path: string | URL, optOrCallback?: FileOptionsArgument | Callback | null | undefined, - callback?: Callback + callback?: Callback, ): void { path = path instanceof URL ? fromFileUrl(path) : path; let cb: Callback | undefined; @@ -77,15 +77,15 @@ export function readFile( export function readFileSync( path: string | URL, - opt: TextOptionsArgument + opt: TextOptionsArgument, ): string; export function readFileSync( path: string | URL, - opt?: BinaryOptionsArgument + opt?: BinaryOptionsArgument, ): Buffer; export function readFileSync( path: string | URL, - opt?: FileOptionsArgument + opt?: FileOptionsArgument, ): string | Buffer { path = path instanceof URL ? fromFileUrl(path) : path; const data = Deno.readFileSync(path); |