fix: force optional options (#6817)

This commit is contained in:
Michael Kriese 2020-07-22 13:24:51 +02:00 committed by GitHub
parent 008f781d42
commit 698a2ed962
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ export function outputFile(
data: any, data: any,
options?: WriteFileOptions | string options?: WriteFileOptions | string
): Promise<void> { ): Promise<void> {
return fs.outputFile(file, data, options); return fs.outputFile(file, data, options ?? {});
} }
export function remove(dir: string): Promise<void> { export function remove(dir: string): Promise<void> {
@ -68,5 +68,5 @@ export function move(
dest: string, dest: string,
options?: MoveOptions options?: MoveOptions
): Promise<void> { ): Promise<void> {
return fs.move(src, dest, options); return fs.move(src, dest, options ?? {});
} }