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?
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();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With