---
id: fast-foundation.container.getresolver
title: Container.getResolver() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [Container](./fast-foundation.container.md) &gt; [getResolver](./fast-foundation.container.getresolver.md)

## Container.getResolver() method

Gets a resolver for the specified key.

<b>Signature:</b>

```typescript
getResolver<K extends Key, T = K>(key: K | Key, autoRegister?: boolean): Resolver<T> | null;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | K \| [Key](./fast-foundation.key.md) | The key to get the resolver for. |
|  autoRegister | boolean | Indicates whether or not to try to auto-register a dependency for the key if one is not explicitly registered. |

<b>Returns:</b>

[Resolver](./fast-foundation.resolver.md)<!-- -->&lt;T&gt; \| null
