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

Method constructTypeManagerOptions

src/type-manager.ts:338–359  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls 2

Tested by

no test coverage detected