Skip to main content
Version: 2.x

newInstanceOf() function

@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.