docs(core): add documentation for HostListener (#40720)

add return value documentations for HostListener callbacks

Closes #40708

PR Close #40720
This commit is contained in:
abarghoud 2021-02-05 11:49:41 +01:00 committed by Joey Perrott
parent 322951af49
commit 13d82ce248
1 changed files with 5 additions and 0 deletions

View File

@ -823,6 +823,11 @@ export interface HostListenerDecorator {
/**
* Decorator that declares a DOM event to listen for,
* and provides a handler method to run when that event occurs.
*
* Angular invokes the supplied handler method when the host element emits the specified event,
* and updates the bound element with the result.
*
* If the handler method returns false, applies `preventDefault` on the bound element.
*/
(eventName: string, args?: string[]): any;
new(eventName: string, args?: string[]): any;