MCPcopy Index your code
hub / github.com/angular/angular / getMetadata

Method getMetadata

packages/forms/signals/src/schema/logic.ts:328–334  ·  view source on GitHub ↗

* Retrieves or creates the `AbstractLogic` for a given metadata key. * @param key The `MetadataKey` for which to get the logic. * @returns The `AbstractLogic` associated with the key.

(key: MetadataKey<any, T, any>)

Source from the content-addressed store, hash-verified

326 * @returns The `AbstractLogic` associated with the key.
327 */
328 getMetadata<T>(key: MetadataKey<any, T, any>): AbstractLogic<T> {
329 cast<MetadataKey<unknown, unknown, unknown>>(key);
330 if (!this.metadata.has(key)) {
331 this.metadata.set(key, new MetadataMergeLogic(this.predicates, key));
332 }
333 return this.metadata.get(key)! as AbstractLogic<T>;
334 }
335
336 /**
337 * Merges logic from another `Logic` instance into this one.

Callers 5

mergeInMethod · 0.95
addMetadataRuleMethod · 0.80
getMethod · 0.80
FieldNodeStateClass · 0.80

Calls 4

castFunction · 0.90
hasMethod · 0.65
setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected