---
url: 'https://adk.nht.io/api/@nhtio/adk/shims/functions/registerAdkResolver.md'
---

# Function: registerAdkResolver()

```ts
function registerAdkResolver<TBundle>(resolver: AdkResolverFn<TBundle>): void;
```

Defined in: [src/shims/index.ts:445](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/shims/index.ts#L445)

Register (or replace) the resolver the ambient [adk](../variables/adk.md) shim delegates to.

## Type Parameters

| Type Parameter               | Default type                   | Description                                                         |
| ---------------------------- | ------------------------------ | ------------------------------------------------------------------- |
| `TBundle` *extends* `object` | [`@nhtio/adk`](../../index.md) | The shape the supplied resolver produces. Defaults to AdkNamespace. |

## Parameters

| Parameter  | Type                                                             | Description                                                             |
| ---------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `resolver` | [`AdkResolverFn`](../type-aliases/AdkResolverFn.md)<`TBundle`> | The resolver [adk](../variables/adk.md) will delegate to going forward. |

## Returns

`void`

## Remarks

Call once, early, before anything reads [adk](../variables/adk.md). Re-registering **before** the ambient shim's
first successful resolution silently overwrites the previous registration — the newest call wins,
no throw, no warning; this is the expected shape for a speculative registration made during
bootstrap that gets superseded before anything actually resolves. Re-registering **after** the
first successful resolution throws [E\_SHIM\_RESOLVER\_ALREADY\_RESOLVED](../variables/E_SHIM_RESOLVER_ALREADY_RESOLVED.md) — see that
exception's docs for why swapping resolvers under already-resolved consumers is treated as a
hard error rather than a silent replace.

## Throws

[E\_SHIM\_RESOLVER\_ALREADY\_RESOLVED](../variables/E_SHIM_RESOLVER_ALREADY_RESOLVED.md) if the ambient shim already resolved once.
