ngxtension / ngxtension-platform

Utilities for Angular
https://ngxtension.netlify.app/
MIT License
611 stars 88 forks source link

feat: migration outputs enhancements #312

Closed eneajaho closed 6 months ago

eneajaho commented 7 months ago

// currently someOutput = output();

// should be someOutput = output();



More ideas are welcome 🤗
andrei4ik1997 commented 7 months ago

Hi @eneajaho, I encountered the following problem during migration. In my application I used:

@Output() private readonly testChange = new EventEmitter<any>();

After migration I got

private readonly testChange = output<any>();

But when I tried to run the application I received the following error:

error NG1053: Cannot use "output" on a class member that is declared as private. Update the class field to be either: public, public readonly, protected

The error was easily resolved by replacing private with protected

Maybe it’s worth considering this case in migration?

eneajaho commented 7 months ago

Hi, yeah that would be great to be added. Thanks for sharing.