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

Function verifyHostBindings

packages/compiler/src/render3/view/compiler.ts:573–586  ·  view source on GitHub ↗
(
  bindings: ParsedHostBindings,
  sourceSpan: ParseSourceSpan,
)

Source from the content-addressed store, hash-verified

571 * @returns array of errors associated with a given set of host bindings.
572 */
573export function verifyHostBindings(
574 bindings: ParsedHostBindings,
575 sourceSpan: ParseSourceSpan,
576): ParseError[] {
577 // TODO: abstract out host bindings verification logic and use it instead of
578 // creating events and properties ASTs to detect errors (FW-996)
579 const bindingParser = makeBindingParser();
580 bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);
581 bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);
582
583 validateNoEventBindings(bindings, bindingParser, sourceSpan);
584
585 return bindingParser.errors;
586}
587
588/**
589 * Validates that there are no event attribute bindings in the host bindings.

Callers 5

extractHostBindingsFunction · 0.90
toR3DirectiveMetaFunction · 0.90
extractHostBindingsFunction · 0.90
buildHostMetadataFunction · 0.90

Calls 4

makeBindingParserFunction · 0.90
validateNoEventBindingsFunction · 0.85

Tested by

no test coverage detected