mirror of
https://github.com/angular/angular.git
synced 2026-11-23 07:05:14 -05:00
Adds an opt-in type-checking option that reports event bindings on elements with matched directives whose name matches neither an output of the matched directives nor a known native DOM event. Since the compiler cannot know the set of custom events that may bubble up from descendant elements, the check is heuristic: only single-identifier camelCase names are reported. Dash-separated names, which bubbling custom events conventionally use, native DOM events (compared ignoring case, to cover vendor-prefixed names such as webkitAnimationEnd), key pseudo-events and targeted events are exempt. With CUSTOM_ELEMENTS_SCHEMA, elements without a matched component are exempt as well; NO_ERRORS_SCHEMA disables the check entirely. The option is opt-in everywhere for now; enabling it by default under strictTemplates inside google3 (via the sync markers) will follow once the google3 cleanup is complete. Related to #43603