---
id: fast-foundation.container.getfactory
title: Container.getFactory() 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; [getFactory](./fast-foundation.container.getfactory.md)

## Container.getFactory() method

Gets the factory for the specified key.

<b>Signature:</b>

```typescript
getFactory<T extends Constructable>(key: T): Factory<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | T | The key to get the factory for. |

<b>Returns:</b>

[Factory](./fast-foundation.factory.md)<!-- -->&lt;T&gt;
