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

Function verifyHostBindings

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

Source from the content-addressed store, hash-verified

582 * @returns array of errors associated with a given set of host bindings.
583 */
584export function verifyHostBindings(
585 bindings: ParsedHostBindings,
586 sourceSpan: ParseSourceSpan,
587): ParseError[] {
588 // TODO: abstract out host bindings verification logic and use it instead of
589 // creating events and properties ASTs to detect errors (FW-996)
590 const bindingParser = makeBindingParser();
591 bindingParser.createDirectiveHostEventAsts(bindings.listeners, sourceSpan);
592 bindingParser.createBoundHostProperties(bindings.properties, sourceSpan);
593
594 validateNoEventBindings(bindings, bindingParser, sourceSpan);
595
596 return bindingParser.errors;
597}
598
599/**
600 * Validates that there are no event attribute bindings in the host bindings.

Callers 2

extractHostBindingsFunction · 0.90

Calls 4

makeBindingParserFunction · 0.90
validateNoEventBindingsFunction · 0.85

Tested by

no test coverage detected