Skip to main content
Version: 1.x

@microsoft/fast-foundation > transient

transient() function

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

Signature:
export declare function transient<T extends Constructable>(): typeof transientDecorator;
Returns:

typeof transientDecorator

Example

@transient()
class Foo { }