summaryrefslogtreecommitdiff
path: root/cli/js/read_file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/read_file.ts')
-rw-r--r--cli/js/read_file.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/js/read_file.ts b/cli/js/read_file.ts
index 317401af5..b8d428b8c 100644
--- a/cli/js/read_file.ts
+++ b/cli/js/read_file.ts
@@ -2,14 +2,14 @@
import { open, openSync } from "./files.ts";
import { readAll, readAllSync } from "./buffer.ts";
-export function readFileSync(path: string): Uint8Array {
+export function readFileSync(path: string | URL): Uint8Array {
const file = openSync(path);
const contents = readAllSync(file);
file.close();
return contents;
}
-export async function readFile(path: string): Promise<Uint8Array> {
+export async function readFile(path: string | URL): Promise<Uint8Array> {
const file = await open(path);
const contents = await readAll(file);
file.close();