* Configures type metadata based on provided options. * * @param {TypeOptions } typeOptions Type options. * * @returns {this} Current instance of type metadata.
(typeOptions: TypeOptions<TObject>)
| 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) |
no test coverage detected