Merge pull request #4689 from dbeckwith/patch-1

Fixes check callback signature in lockfile.d.ts
This commit is contained in:
Horiuchi_H
2015-06-22 13:57:25 +09:00
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -9,6 +9,9 @@ var path: string;
var opts: lockfile.Options;
var callback: (err: Error) => {
};
var callback2: (err: Error, isLocked: boolean) => {
};
opts = {
@@ -25,7 +28,7 @@ lockfile.lockSync(path, opts);
lockfile.unlock(path, callback);;
lockfile.unlockSync(path);
lockfile.check(path, opts, callback);
lockfile.check(path, callback);
lockfile.check(path, opts, callback2);
lockfile.check(path, callback2);
bool = lockfile.checkSync(path, opts);
+2 -2
View File
@@ -18,7 +18,7 @@ declare module 'lockfile' {
export function unlock(path: string, callback: (err: Error) => void): void;
export function unlockSync(path: string):void;
export function check(path: string, opts: Options, callback: (err: Error) => void): void;
export function check(path: string, callback: (err: Error) => void): void;
export function check(path: string, opts: Options, callback: (err: Error, isLocked: boolean) => void): void;
export function check(path: string, callback: (err: Error, isLocked: boolean) => void): void;
export function checkSync(path: string, opts: Options): boolean;
}