@unlib-js/depi • Docs
@unlib-js/depi / helpers/inversify/getDeps
default<
T
>(clazz
):object
Retrieves the dependencies (properties and constructor parameters) of a
given class decorated with InversifyJS's @inject
decorator.
This function uses the MetadataReader
from the inversify
library to
extract the metadata associated with the class.
The returned object contains two properties:
props
: an array of property keys that have the@inject()
decorator applied.params
: a function that returns an array of constructor parameter indexes that have the@inject()
decorator applied.
Type Parameter |
---|
T extends AnyConstructor |
Parameter | Type | Description |
---|---|---|
clazz |
T |
The class for which to retrieve the dependencies. |
object
An object containing the property and parameter dependencies of the class.
Name | Type | Default value | Defined in |
---|---|---|---|
params |
<T >(clazz ) => number [] |
paramDepsOf | helpers/inversify/getDeps.ts:32 |
props |
keyof InstanceType <T >[] |
- | helpers/inversify/getDeps.ts:31 |