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

Method hasAlias

src/type-metadata.ts:1078–1092  ·  view source on GitHub ↗

* Configures alias. * * @param {Optional } alias Alias. * * @returns {this} Current instance of type metadata.

(alias: Optional<Alias>)

Source from the content-addressed store, hash-verified

1076 * @returns {this} Current instance of type metadata.
1077 */
1078 public hasAlias(alias: Optional<Alias>): this
1079 {
1080 this.releaseAlias();
1081
1082 this.typeOptions.alias = alias;
1083
1084 if (alias !== undefined)
1085 {
1086 this.currentTypeFnMap.set(alias, this.typeFn);
1087 }
1088
1089 this.currentTypeState = new UnresolvedTypeState<TObject>(this);
1090
1091 return this;
1092 }
1093
1094 /**
1095 * Releases alias.

Callers 2

configureMethod · 0.95
configureMethod · 0.45

Calls 2

releaseAliasMethod · 0.95
setMethod · 0.80

Tested by 1

configureMethod · 0.36