---
id: fast-foundation.inject
title: inject variable
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [inject](./fast-foundation.inject.md)

## inject variable

A decorator that specifies what to inject into its target.

<b>Signature:</b>

```typescript
inject: (...dependencies: Key[]) => (target: any, key?: string | number | undefined, descriptor?: number | PropertyDescriptor | undefined) => void
```

## Remarks

The decorator can be used to decorate a class, listing all of the classes dependencies. Or it can be used to decorate a constructor paramter, indicating what to inject for that parameter. Or it can be used for a web component property, indicating what that property should resolve to.
