mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[fs-extra] add copyFile() support
This commit is contained in:
@@ -214,3 +214,7 @@ fs.writeFile("foo.txt", "i am foo", { encoding: "utf-8" });
|
||||
|
||||
// $ExpectType Promise<string>
|
||||
fs.mkdtemp("foo");
|
||||
|
||||
fs.copyFile("src", "dest").then();
|
||||
fs.copyFile("src", "dest", fs.constants.COPYFILE_EXCL).then();
|
||||
fs.copyFile("src", "dest", errorCallback);
|
||||
|
||||
4
types/fs-extra/index.d.ts
vendored
4
types/fs-extra/index.d.ts
vendored
@@ -20,6 +20,10 @@ export function copy(src: string, dest: string, callback: (err: Error) => void):
|
||||
export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void;
|
||||
export function copySync(src: string, dest: string, options?: CopyOptionsSync): void;
|
||||
|
||||
export function copyFile(src: string, dest: string, flags?: number): Promise<void>;
|
||||
export function copyFile(src: string, dest: string, callback: (err: Error) => void): void;
|
||||
export function copyFile(src: string, dest: string, flags: number, callback: (err: Error) => void): void;
|
||||
|
||||
export function move(src: string, dest: string, options?: MoveOptions): Promise<void>;
|
||||
export function move(src: string, dest: string, callback: (err: Error) => void): void;
|
||||
export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user