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

Method resolveInjectState

src/inject-metadata.ts:136–147  ·  view source on GitHub ↗

* Resolves inject state. * * Calling this method has side effects by recomputing injection state. If you need current * inject state then use provided getter for that. * * @returns {ResolvedInjectState } Resolved inject state.

()

Source from the content-addressed store, hash-verified

134 * @returns {ResolvedInjectState<TDeclaringObject, TObject>} Resolved inject state.
135 */
136 public resolveInjectState(): ResolvedInjectState<TDeclaringObject, TObject>
137 {
138 const injectOptions = this.injectOptions;
139 const key = injectOptions.key;
140 const typeArgument = injectOptions.typeArgument === undefined ? this.reflectTypeFn : injectOptions.typeArgument;
141 const typeMetadata = this.resolveTypeMetadata(typeArgument);
142 const resolvedInjectState = new ResolvedInjectState<TDeclaringObject, TObject>(this, key, typeArgument, typeMetadata);
143
144 this.currentInjectState = resolvedInjectState;
145
146 return resolvedInjectState;
147 }
148
149 /**
150 * Unresolves inject state.

Callers 3

keyMethod · 0.80
typeArgumentMethod · 0.80
typeMetadataMethod · 0.80

Calls 1

resolveTypeMetadataMethod · 0.80

Tested by

no test coverage detected