index.d.ts
1 declare const pathExists: { 2 /** 3 Check if a path exists. 4 5 @returns Whether the path exists. 6 7 @example 8 ``` 9 // foo.ts 10 import pathExists = require('path-exists'); 11 12 (async () => { 13 console.log(await pathExists('foo.ts')); 14 //=> true 15 })(); 16 ``` 17 */ 18 (path: string): Promise<boolean>; 19 20 /** 21 Synchronously check if a path exists. 22 23 @returns Whether the path exists. 24 */ 25 sync(path: string): boolean; 26 }; 27 28 export = pathExists;