# @types/resolve-bin

> TypeScript definitions for resolve-bin

Latest version **0.4.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/resolve-bin
pnpm add @types/resolve-bin
yarn add @types/resolve-bin
bun add @types/resolve-bin
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.3 |
| Published | 2023-11-07 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/resolve-bin
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-bin
- npm.io page: https://npm.io/package/@types/resolve-bin

## Recent versions

- 0.4.3 (latest) — 2023-11-07
- 0.4.1 (ts3.6) — 2021-07-08
- 0.4.0 (ts3.3) — 2020-11-24
- 0.4.2 — 2023-10-18

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve-bin/index.d.ts)
````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](https://github.com/cameronhunter).

---
_Source: https://npm.io/package/@types/resolve-bin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
