# bellpull/node-which

> Every export of bellpull/node-which, with its signature and doc comment: module.exports, which, plus 1 type.

Source: https://bellpull.interlace.tools/docs/api/node-which

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import which from 'bellpull/node-which';
import { module.exports } from 'bellpull/node-which';
```

## Functions

### default

The default export, declared as `which`.

node-which's `which`: the same search, answered as a promise.

```ts
function which(cmd: string, opt?: NodeWhichOptions): Promise<Found>;

namespace which {
    var sync: typeof whichSync;
}
```

| Parameter | Type |
| :-- | :-- |
| `cmd` | `string` |
| `opt` (optional) | `NodeWhichOptions` |

**Returns** `Promise<Found>`

### module.exports

node-which's `which`: the same search, answered as a promise.

```ts
function which(cmd: string, opt?: NodeWhichOptions): Promise<Found>;

namespace which {
    var sync: typeof whichSync;
}
```

| Parameter | Type |
| :-- | :-- |
| `cmd` | `string` |
| `opt` (optional) | `NodeWhichOptions` |

**Returns** `Promise<Found>`

## Interfaces

### NodeWhichOptions

```ts
interface NodeWhichOptions {
    /** Return every match rather than the first. */
    all?: boolean;
    /** Return `null` rather than throwing when nothing is found. */
    nothrow?: boolean;
    /** Search this instead of `PATH`. */
    path?: string;
    /** Use these extensions instead of `PATHEXT`, on Windows. */
    pathExt?: string;
    /** Split `path` and `pathExt` on this instead of the platform's delimiter. */
    delimiter?: string;
}
```
