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

Method constructTypeOptions

src/type-metadata.ts:499–517  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected