Installation
npm install --save @types/which
Summary
This package contains type definitions for which (https://github.com/isaacs/node-which).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/which.
declare function which(cmd: string, options: which.Options & which.AsyncOptions & which.OptionsAll): Promise<string[]>;
declare function which(cmd: string, options?: which.Options & which.AsyncOptions & which.OptionsFirst): Promise<string>;
declare namespace which {
function sync(cmd: string, options: Options & OptionsAll & OptionsNoThrow): ReadonlyArray<string> | null;
function sync(cmd: string, options: Options & OptionsFirst & OptionsNoThrow): string | null;
function sync(cmd: string, options: Options & OptionsAll & OptionsThrow): ReadonlyArray<string>;
function sync(cmd: string, options?: Options & OptionsFirst & OptionsThrow): string;
function sync(cmd: string, options: Options): string | ReadonlyArray<string> | null;
interface OptionsAll extends AsyncOptions {
all: true;
}
interface OptionsFirst extends AsyncOptions {
all?: false | undefined;
}
interface OptionsNoThrow extends Options {
nothrow: true;
}
interface OptionsThrow extends Options {
nothrow?: false | undefined;
}
interface AsyncOptions {
all?: boolean | undefined;
path?: string | undefined;
pathExt?: string | undefined;
}
interface Options extends AsyncOptions {
nothrow?: boolean | undefined;
}
}
export = which;
Additional Details
- Last updated: Wed, 18 Oct 2023 18:04:04 GMT
- Dependencies: none
Credits
These definitions were written by vvakame, cspotcode, and Piotr Błażejewicz.