* Constructs initial type options by extending passed options * with default values if they are not overriden. All references are kept. * * @param {TypeOptions } typeOptions Type options. * * @returns {TypeOptions } Constructed type options.
(typeOptions: TypeOptions<TObject>)
| 497 | * @returns {TypeOptions<TObject>} Constructed type options. |
| 498 | */ |
| 499 | private constructTypeOptions(typeOptions: TypeOptions<TObject>): TypeOptions<TObject> |
| 500 | { |
| 501 | if (typeOptions.customValueMap === undefined) |
| 502 | { |
| 503 | typeOptions.customValueMap = new Map<CustomKey<any>, CustomValue>(); |
| 504 | } |
| 505 | |
| 506 | if (typeOptions.propertyOptionsMap === undefined) |
| 507 | { |
| 508 | typeOptions.propertyOptionsMap = new Map<PropertyName, PropertyOptions<any>>(); |
| 509 | } |
| 510 | |
| 511 | if (typeOptions.injectOptionsMap === undefined) |
| 512 | { |
| 513 | typeOptions.injectOptionsMap = new Map<InjectIndex, InjectOptions<any>>(); |
| 514 | } |
| 515 | |
| 516 | return typeOptions; |
| 517 | } |
| 518 | |
| 519 | /** |
| 520 | * Configures type extension metadata. |