Angular 9 tslint no output rename

Viewed 5537

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?

2 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();

Related