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

Method has

packages/forms/signals/src/field/metadata.ts:75–80  ·  view source on GitHub ↗

Checks whether the current metadata state has the given metadata key.

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

Source from the content-addressed store, hash-verified

73
74 /** Checks whether the current metadata state has the given metadata key. */
75 has(key: MetadataKey<any, any, any>): boolean {
76 // Metadata keys get added to the map lazily, on first access,
77 // so we can't rely on checking presence in the metadata map.
78 // Instead we check if there is any logic for the given metadata key.
79 return this.node.logicNode.logic.hasMetadata(key);
80 }
81}

Callers 1

getMethod · 0.95

Calls 1

hasMetadataMethod · 0.65

Tested by

no test coverage detected