MCPcopy Create free account
hub / github.com/angular/angular / has

Method has

packages/forms/signals/src/field/metadata.ts:83–88  ·  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

81
82 /** Checks whether the current metadata state has the given metadata key. */
83 has(key: MetadataKey<any, any, any>): boolean {
84 // Metadata keys get added to the map lazily, on first access,
85 // so we can't rely on checking presence in the metadata map.
86 // Instead we check if there is any logic for the given metadata key.
87 return this.node.logicNode.logic.hasMetadata(key);
88 }
89}

Callers 1

getMethod · 0.95

Calls 1

hasMetadataMethod · 0.65

Tested by

no test coverage detected