diff options
Diffstat (limited to 'fs/copy.ts')
-rw-r--r-- | fs/copy.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/copy.ts b/fs/copy.ts index c3c97d1ba..616fba975 100644 --- a/fs/copy.ts +++ b/fs/copy.ts @@ -21,11 +21,9 @@ async function ensureValidCopy( src: string, dest: string, options: CopyOptions, - isCopyFolder: boolean = false + isCopyFolder = false ): Promise<Deno.FileInfo> { - let destStat: Deno.FileInfo | null; - - destStat = await Deno.lstat(dest).catch( + const destStat: Deno.FileInfo | null = await Deno.lstat(dest).catch( (): Promise<null> => Promise.resolve(null) ); @@ -47,7 +45,7 @@ function ensureValidCopySync( src: string, dest: string, options: CopyOptions, - isCopyFolder: boolean = false + isCopyFolder = false ): Deno.FileInfo { let destStat: Deno.FileInfo | null; |