mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
400 B
TypeScript
16 lines
400 B
TypeScript
import fileExists = require('file-exists');
|
|
|
|
fileExists('/index.html', (err, exists) => {
|
|
err; // $ExpectType Error | null
|
|
exists; // $ExpectType boolean
|
|
});
|
|
|
|
fileExists('/index.html', {root: ''}, (err, exists) => {
|
|
err; // $ExpectType Error | null
|
|
exists; // $ExpectType boolean
|
|
});
|
|
|
|
// $ExpectType boolean
|
|
fileExists.sync('/index.html');
|
|
fileExists.sync('/index.html', {root: ''});
|