diff --git a/path-exists/path-exists-tests.ts b/path-exists/path-exists-tests.ts new file mode 100644 index 0000000000..bb9bdc321e --- /dev/null +++ b/path-exists/path-exists-tests.ts @@ -0,0 +1,8 @@ +/// + +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")); diff --git a/path-exists/path-exists.d.ts b/path-exists/path-exists.d.ts new file mode 100644 index 0000000000..266ab66e5b --- /dev/null +++ b/path-exists/path-exists.d.ts @@ -0,0 +1,14 @@ +// Type definitions for path-exists 1.0.0 +// Project: https://github.com/sindresorhus/path-exists +// Definitions by: Shogo Iwano +// 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; +}