Skip to content

Commit

Permalink
fix(fs-extra): missing createSymlink
Browse files Browse the repository at this point in the history
Missed:
- `createSymlink`
- `createSymlinkSync`

see: jprichardson/node-fs-extra#758
see: cucumber/cucumber-js#1286

Thanks!
  • Loading branch information
peterblazejewicz committed Feb 15, 2020
1 parent f2db20e commit b1d624e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions types/fs-extra/fs-extra-tests.ts
Expand Up @@ -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);
7 changes: 6 additions & 1 deletion 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 <https://github.com/alan-agius4>,
// midknight41 <https://github.com/midknight41>,
Expand All @@ -7,6 +7,7 @@
// Justin Rockwood <https://github.com/jrockwood>,
// Sang Dang <https://github.com/sangdth>,
// Florian Keller <https://github.com/ffflorian>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

Expand Down Expand Up @@ -35,6 +36,10 @@ export function createFile(file: string): Promise<void>;
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<void>;
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<void>;
export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void;
export function ensureDirSync(path: string, options?: EnsureOptions | number): void;
Expand Down

0 comments on commit b1d624e

Please sign in to comment.