* Constructs initial type manager options by extending passed options * with default values if they are not overriden. All references are kept. * * @param {TypeManagerOptions} typeManagerOptions Type manager options. * * @returns {TypeManagerOptions} Constructed type mana
(typeManagerOptions: TypeManagerOptions)
| 336 | * @returns {TypeManagerOptions} Constructed type manager options. |
| 337 | */ |
| 338 | private constructTypeManagerOptions(typeManagerOptions: TypeManagerOptions): TypeManagerOptions |
| 339 | { |
| 340 | let typeOptionsBase = typeManagerOptions.typeOptionsBase; |
| 341 | |
| 342 | if (typeOptionsBase === undefined) |
| 343 | { |
| 344 | typeOptionsBase = {}; |
| 345 | |
| 346 | typeManagerOptions.typeOptionsBase = this.constructTypeOptionsBase(typeOptionsBase); |
| 347 | } |
| 348 | |
| 349 | let typeOptionsMap = typeManagerOptions.typeOptionsMap; |
| 350 | |
| 351 | if (typeOptionsMap === undefined) |
| 352 | { |
| 353 | typeOptionsMap = new Map<TypeFn<any>, TypeOptions<any>>(); |
| 354 | |
| 355 | typeManagerOptions.typeOptionsMap = this.constructTypeOptionsMap(typeOptionsMap); |
| 356 | } |
| 357 | |
| 358 | return typeManagerOptions; |
| 359 | } |
| 360 | |
| 361 | /** |
| 362 | * Constructs type options base. |
no test coverage detected