diff --git a/types/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts index 025c0e0c55890a..4a4b44fedcd8f9 100644 --- a/types/fs-extra/fs-extra-tests.ts +++ b/types/fs-extra/fs-extra-tests.ts @@ -235,3 +235,7 @@ fs.mkdtemp("foo"); fs.copyFile("src", "dest").then(); fs.copyFile("src", "dest", fs.constants.COPYFILE_EXCL).then(); fs.copyFile("src", "dest", errorCallback); + +fs.createSymlink("src", "dest", "dir").then(); +fs.createSymlink("src", "dest", "file").then(); +fs.createSymlink("src", "dest", "dir", errorCallback); diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index 32bc2dcd76af2f..09a067b863b01b 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for fs-extra 8.0 +// Type definitions for fs-extra 8.1 // Project: https://github.com/jprichardson/node-fs-extra // Definitions by: Alan Agius , // midknight41 , @@ -7,6 +7,7 @@ // Justin Rockwood , // Sang Dang , // Florian Keller +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -35,6 +36,10 @@ export function createFile(file: string): Promise; export function createFile(file: string, callback: (err: Error) => void): void; export function createFileSync(file: string): void; +export function createSymlink(src: string, dest: string, type: SymlinkType): Promise; +export function createSymlink(src: string, dest: string, type: SymlinkType, callback?: (err: Error) => void): void; +export function createSymlinkSync(src: string, dest: string, type: SymlinkType): void; + export function ensureDir(path: string, options?: EnsureOptions | number): Promise; export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void; export function ensureDirSync(path: string, options?: EnsureOptions | number): void;