MCPcopy Create free account
hub / github.com/dipscope/TypeManager.TS / reflectInjectMetadata

Method reflectInjectMetadata

src/type-metadata.ts:1051–1069  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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.

Callers 1

TypeFunction · 0.80

Calls 2

getOwnReflectMetadataFunction · 0.90

Tested by

no test coverage detected