* Reflects inject metadata. * * Used to configure inject metadata based on reflect metadata as inject decorators may be omitted. * * @returns {this} Current instance of type metadata.
()
| 1049 | * @returns {this} Current instance of type metadata. |
| 1050 | */ |
| 1051 | public reflectInjectMetadata(): this |
| 1052 | { |
| 1053 | if (this.typeFn.length === 0) |
| 1054 | { |
| 1055 | return this; |
| 1056 | } |
| 1057 | |
| 1058 | const injectTypeFns = (getOwnReflectMetadata('design:paramtypes', this.typeFn) ?? new Array<TypeFn<any>>()) as Array<TypeFn<any>>; |
| 1059 | |
| 1060 | for (let injectIndex = 0; injectIndex < injectTypeFns.length; injectIndex++) |
| 1061 | { |
| 1062 | if (!this.currentInjectMetadataMap.has(injectIndex)) |
| 1063 | { |
| 1064 | this.configureInjectMetadata(injectIndex, { typeArgument: injectTypeFns[injectIndex] }); |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | return this; |
| 1069 | } |
| 1070 | |
| 1071 | /** |
| 1072 | * Configures alias. |
no test coverage detected