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

Method configure

src/type-metadata.ts:1738–1866  ·  view source on GitHub ↗

* Configures type metadata based on provided options. * * @param {TypeOptions } typeOptions Type options. * * @returns {this} Current instance of type metadata.

(typeOptions: TypeOptions<TObject>)

Source from the content-addressed store, hash-verified

1736 * @returns {this} Current instance of type metadata.
1737 */
1738 public configure(typeOptions: TypeOptions<TObject>): this
1739 {
1740 if (typeOptions.alias !== undefined)
1741 {
1742 this.hasAlias(typeOptions.alias);
1743 }
1744
1745 if (typeOptions.customValueMap !== undefined)
1746 {
1747 this.hasCustomValueMap(typeOptions.customValueMap);
1748 }
1749
1750 if (typeOptions.defaultValue !== undefined)
1751 {
1752 this.hasDefaultValue(typeOptions.defaultValue);
1753 }
1754
1755 if (typeOptions.serializedDefaultValue !== undefined)
1756 {
1757 this.hasSerializedDefaultValue(typeOptions.serializedDefaultValue);
1758 }
1759
1760 if (typeOptions.deserializedDefaultValue !== undefined)
1761 {
1762 this.hasDeserializedDefaultValue(typeOptions.deserializedDefaultValue);
1763 }
1764
1765 if (typeOptions.beforeSerializeCallback !== undefined)
1766 {
1767 this.hasBeforeSerializeCallback(typeOptions.beforeSerializeCallback);
1768 }
1769
1770 if (typeOptions.afterDeserializeCallback !== undefined)
1771 {
1772 this.hasAfterDeserializeCallback(typeOptions.afterDeserializeCallback);
1773 }
1774
1775 if (typeOptions.discriminator !== undefined)
1776 {
1777 this.hasDiscriminator(typeOptions.discriminator);
1778 }
1779
1780 if (typeOptions.discriminant !== undefined)
1781 {
1782 this.hasDiscriminant(typeOptions.discriminant);
1783 }
1784
1785 if (typeOptions.factory !== undefined)
1786 {
1787 this.hasFactory(typeOptions.factory);
1788 }
1789
1790 if (typeOptions.injectable !== undefined)
1791 {
1792 this.isInjectable(typeOptions.injectable);
1793 }
1794
1795 if (typeOptions.injector !== undefined)

Callers 1

constructorMethod · 0.95

Calls 15

hasAliasMethod · 0.95
hasCustomValueMapMethod · 0.95
hasDefaultValueMethod · 0.95
hasDiscriminatorMethod · 0.95
hasDiscriminantMethod · 0.95
hasFactoryMethod · 0.95
isInjectableMethod · 0.95
hasInjectorMethod · 0.95

Tested by

no test coverage detected