---
url: 'https://adk.nht.io/api/batteries/media/lint/type-aliases/PeerResolver.md'
description: >-
  The peer-resolution probe: returns `true` when `peer` resolves from
  `fromFile`. Defaults to Node's resolver anchored at the linted file (so it
  sees the consumer's `node_modules`). Exposed as a settable seam so the rule's
  spec can simulate installed/missing peers without depending on the test
  runner's own `node_modules` layout — production never sets it.
---

# Type Alias: PeerResolver

```ts
type PeerResolver = (peer: string, fromFile: string) => boolean;
```

Defined in: [src/batteries/media/lint.ts:495](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/lint.ts#L495)

The peer-resolution probe: returns `true` when `peer` resolves from `fromFile`. Defaults to
Node's resolver anchored at the linted file (so it sees the consumer's `node_modules`).
Exposed as a settable seam so the rule's spec can simulate installed/missing peers without
depending on the test runner's own `node_modules` layout — production never sets it.

## Parameters

| Parameter  | Type     |
| ---------- | -------- |
| `peer`     | `string` |
| `fromFile` | `string` |

## Returns

`boolean`
