---
id: fast-foundation.transient_1
title: transient() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

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

## transient() function

Registers the `target` class as a transient dependency; each time the dependency is resolved a new instance will be created.

<b>Signature:</b>

```typescript
export declare function transient<T extends Constructable>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  target | T &amp; Partial&lt;[RegisterSelf](./fast-foundation.registerself.md)<!-- -->&lt;T&gt;&gt; | The class / constructor function to register as transient. |

<b>Returns:</b>

T &amp; [RegisterSelf](./fast-foundation.registerself.md)<!-- -->&lt;T&gt;

## Example


```ts
@transient()
class Foo { }

```
