mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-20 08:00:20 +00:00
feat(fs-extra): add SymlinkType
This commit is contained in:
@@ -172,7 +172,7 @@ fs.ensureLink(path, path).then(() => {
|
||||
});
|
||||
fs.ensureLink(path, path, errorCallback);
|
||||
fs.ensureLinkSync(path, path);
|
||||
fs.ensureSymlink(path, path).then(() => {
|
||||
fs.ensureSymlink(path, path, "file").then(() => {
|
||||
// stub
|
||||
});
|
||||
fs.ensureSymlink(path, path, errorCallback);
|
||||
|
||||
Vendored
+4
-2
@@ -83,8 +83,8 @@ export function ensureLink(src: string, dest: string): Promise<void>;
|
||||
export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void;
|
||||
export function ensureLinkSync(src: string, dest: string): void;
|
||||
|
||||
export function ensureSymlink(src: string, dest: string, type?: string): Promise<void>;
|
||||
export function ensureSymlink(src: string, dest: string, type: string, callback: (err: Error) => void): void;
|
||||
export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise<void>;
|
||||
export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void;
|
||||
export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void;
|
||||
export function ensureSymlinkSync(src: string, dest: string, type?: string): void;
|
||||
|
||||
@@ -262,6 +262,8 @@ export type CopyFilterFunction = (src: string) => boolean;
|
||||
|
||||
export type CopyFilter = CopyFilterFunction | RegExp;
|
||||
|
||||
export type SymlinkType = "dir" | "file";
|
||||
|
||||
export interface CopyOptions {
|
||||
dereference?: boolean;
|
||||
overwrite?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user