( bindings: ParsedHostBindings, sourceSpan: ParseSourceSpan, )
| 582 | * @returns array of errors associated with a given set of host bindings. |
| 583 | */ |
| 584 | export 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. |
no test coverage detected