Merge pull request #4973 from shiwano/path-exists

Add path-exists definitions
This commit is contained in:
Masahiro Wakame
2015-07-19 22:52:04 +09:00
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
/// <reference path="path-exists.d.ts" />
import pathExists = require("path-exists");
pathExists("test/path-exists.d.ts", (error, exists) => {
console.log(exists);
});
console.log(pathExists.sync("test/__path-exists.d.ts"));

14
path-exists/path-exists.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for path-exists 1.0.0
// Project: https://github.com/sindresorhus/path-exists
// Definitions by: Shogo Iwano <https://github.com/shiwano>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "path-exists" {
interface PathExists {
(path: string, callback: (error: Error, exists: boolean) => void): void;
sync(path: string): boolean;
}
var pathExists: PathExists;
export = pathExists;
}