Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 9 tslint no output rename

I'm using the @Output decorator in an angular 9 project and the code this this:

@Output('myMethod') myMethod: EventEmitter<any> = new EventEmitter();

Typescript gives my an error and forces me to add this about the code in order to remove the error:

// tslint:disable-next-line:no-output-rename

How can I fix this without having to disable the rule?

like image 391
joe2020wow Avatar asked May 27 '20 13:05

joe2020wow


1 Answers

This is just a tslint warning. To fix it you should not rename the output.

Try to do something like this:

 @Output() myMethod: EventEmitter<any> = new EventEmitter();

like image 124
Federico Baldini Avatar answered Sep 18 '22 17:09

Federico Baldini