UNPKG

914 BTypeScriptView Raw
1// Type definitions for isexe 2.0
2// Project: https://github.com/isaacs/isexe#readme
3// Definitions by: BendingBender <https://github.com/BendingBender>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6/// <reference types="node" />
7
8export = isExe;
9
10declare function isExe(path: string, options?: isExe.Options): Promise<boolean>;
11declare function isExe(
12 path: string,
13 callback: (error: NodeJS.ErrnoException | undefined, isExe: boolean) => void
14): void;
15declare function isExe(
16 path: string,
17 options: isExe.Options,
18 callback: (error: NodeJS.ErrnoException | undefined, isExe: boolean) => void
19): void;
20
21declare namespace isExe {
22 function sync(path: string, options?: Options): boolean;
23
24 interface Options {
25 ignoreErrors?: boolean | undefined;
26 uid?: number | undefined;
27 gid?: number | undefined;
28 pathExt?: string | undefined;
29 }
30}