Skip to main content

@microsoft/fast-foundation > inject

inject variable

A decorator that specifies what to inject into its target.

Signature:
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.