mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add path-exists definitions
This commit is contained in:
@@ -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"));
|
||||
Vendored
+14
@@ -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