You are viewing documentation for a previous version of FAST. The latest version is 3.x. View latest docs →

@microsoft/fast-element/di.js > newInstanceOf

newInstanceOf() function

A decorator that indicates that a new instance should be injected.

Signature:

newInstanceOf: (key: any) => any

Parameters

Parameter

Type

Description

key

any

The dependency key for the new instance.

Returns:

any

Remarks

The instance is not internally cached with a resolver as newInstanceForScope does.