Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fs-extra): missing createSymlink #42385

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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