---
id: fast-foundation.servicelocator.get_1
title: ServiceLocator.get() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [ServiceLocator](./fast-foundation.servicelocator.md) &gt; [get](./fast-foundation.servicelocator.get_1.md)

## ServiceLocator.get() method

Gets a dependency by key.

<b>Signature:</b>

```typescript
get<K extends Key>(key: Key): Resolved<K>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | [Key](./fast-foundation.key.md) | The key to lookup. |

<b>Returns:</b>

[Resolved](./fast-foundation.resolved.md)<!-- -->&lt;K&gt;
