* Resolves custom value map the same way as it is done for the main options. * * @returns {ReadonlyMap , CustomValue>} Resolved custom value map.
()
| 806 | * @returns {ReadonlyMap<CustomKey<any>, CustomValue>} Resolved custom value map. |
| 807 | */ |
| 808 | private resolveCustomValueMap(): ReadonlyMap<CustomKey<any>, CustomValue> |
| 809 | { |
| 810 | const typeOptionsBase = this.typeOptionsBase; |
| 811 | const typeOptions = this.typeOptions; |
| 812 | const customValueMap = new Map<CustomKey<any>, CustomValue>(); |
| 813 | |
| 814 | if (typeOptions.customValueMap === undefined) |
| 815 | { |
| 816 | return customValueMap; |
| 817 | } |
| 818 | |
| 819 | const baseCustomValueMap = typeOptionsBase.customValueMap === undefined |
| 820 | ? EMPTY_MAP |
| 821 | : typeOptionsBase.customValueMap; |
| 822 | |
| 823 | for (const [customKey, customValue] of typeOptions.customValueMap) |
| 824 | { |
| 825 | if (customValue === undefined) |
| 826 | { |
| 827 | customValueMap.set(customKey, baseCustomValueMap.get(customKey)); |
| 828 | |
| 829 | continue; |
| 830 | } |
| 831 | |
| 832 | customValueMap.set(customKey, customValue); |
| 833 | } |
| 834 | |
| 835 | return customValueMap; |
| 836 | } |
| 837 | |
| 838 | /** |
| 839 | * Resolves own parent type metadatas. |
no test coverage detected