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

Method hasInjectMetadataMap

src/type-metadata.ts:1685–1701  ·  view source on GitHub ↗

* Configures inject metadata map. * * @param {Map >} injectOptionsMap Inject options map. * * @returns {this} Current instance of type metadata.

(injectOptionsMap: Map<InjectIndex, InjectOptions<TInjectType>>)

Source from the content-addressed store, hash-verified

1683 * @returns {this} Current instance of type metadata.
1684 */
1685 public hasInjectMetadataMap<TInjectType>(injectOptionsMap: Map<InjectIndex, InjectOptions<TInjectType>>): this
1686 {
1687 const currentInjectOptionsMap = this.clearInjectOptionsMap(injectOptionsMap);
1688
1689 for (const [injectIndex, injectOptions] of injectOptionsMap)
1690 {
1691 const injectMetadata = new InjectMetadata(this.typeManager, this.currentTypeFnMap, this, injectIndex, injectOptions);
1692
1693 this.currentInjectMetadataMap.set(injectIndex, injectMetadata);
1694
1695 currentInjectOptionsMap.set(injectIndex, injectOptions);
1696 }
1697
1698 this.currentTypeState = new UnresolvedTypeState<TObject>(this);
1699
1700 return this;
1701 }
1702
1703 /**
1704 * Clears inject options map.

Callers 1

configureMethod · 0.95

Calls 2

clearInjectOptionsMapMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected