Installation
npm install --save @types/resolve-bin
Summary
This package contains type definitions for resolve-bin (https://github.com/thlorenz/resolve-bin).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-bin.
index.d.ts
interface Options {
/**
* (default: @name) executable name (e.g. 'buster-test')
*/
executable?: string | undefined;
}
interface ResolveBin {
/**
* Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
*
* @param name module name, i.e. 'tap'
* @param cb called back with the full path to the bin file of the module or an error if it couldn't be resolved
*/
(name: string, cb: (error: Error | null, path: string) => void): void;
/**
* Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
*
* @param name module name, i.e. 'tap'
* @param opts options
* @param cb called back with the full path to the bin file of the module or an error if it couldn't be resolved
*/
(name: string, opts: Options, cb: (error: Error | null, path: string) => void): void;
/**
* Synchronous version of resolveBin
*
* @param name module name, i.e. 'tap'
* @param opts options
*/
sync(name: string, opts?: Options): string | never;
}
/**
* Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
*/
declare const resolveBin: ResolveBin;
export = resolveBin;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Cameron Hunter.