mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-31 08:30:12 +00:00
Merge pull request #4973 from shiwano/path-exists
Add path-exists definitions
This commit is contained in:
8
path-exists/path-exists-tests.ts
Normal file
8
path-exists/path-exists-tests.ts
Normal 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
14
path-exists/path-exists.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user