diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-06-03 22:14:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 16:14:37 +0200 |
commit | dc69b03339cc75af1daa70700d1283fa33c22c3b (patch) | |
tree | f7df713b978809938bdf9dd42d90805a89bea380 /cli/dts/lib.deno.ns.d.ts | |
parent | 844a1317ec63e5ed5019e36a52dc3e7d3abfab8b (diff) |
feat(runtime): support URL overloads for Deno.rename/Deno.renameSync (#10512)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index c8b4b60a0..34f8c2ad5 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -1322,7 +1322,10 @@ declare namespace Deno { * they are. It's always an error to rename anything to a non-empty directory. * * Requires `allow-read` and `allow-write` permissions. */ - export function renameSync(oldpath: string, newpath: string): void; + export function renameSync( + oldpath: string | URL, + newpath: string | URL, + ): void; /** Renames (moves) `oldpath` to `newpath`. Paths may be files or directories. * If `newpath` already exists and is not a directory, `rename()` replaces it. @@ -1339,7 +1342,10 @@ declare namespace Deno { * they are. It's always an error to rename anything to a non-empty directory. * * Requires `allow-read` and `allow-write` permission. */ - export function rename(oldpath: string, newpath: string): Promise<void>; + export function rename( + oldpath: string | URL, + newpath: string | URL, + ): Promise<void>; /** Synchronously reads and returns the entire contents of a file as utf8 * encoded string. Reading a directory throws an error. |