summaryrefslogtreecommitdiff
path: root/cli/js/files.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/files.ts')
-rw-r--r--cli/js/files.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/files.ts b/cli/js/files.ts
index d6df8bad0..83922627a 100644
--- a/cli/js/files.ts
+++ b/cli/js/files.ts
@@ -21,7 +21,7 @@ import {
export { OpenOptions } from "./ops/fs/open.ts";
export function openSync(
- path: string,
+ path: string | URL,
options: OpenOptions = { read: true }
): File {
checkOpenOptions(options);
@@ -30,7 +30,7 @@ export function openSync(
}
export async function open(
- path: string,
+ path: string | URL,
options: OpenOptions = { read: true }
): Promise<File> {
checkOpenOptions(options);
@@ -38,7 +38,7 @@ export async function open(
return new File(rid);
}
-export function createSync(path: string): File {
+export function createSync(path: string | URL): File {
return openSync(path, {
read: true,
write: true,
@@ -47,7 +47,7 @@ export function createSync(path: string): File {
});
}
-export function create(path: string): Promise<File> {
+export function create(path: string | URL): Promise<File> {
return open(path, {
read: true,
write: true,