ngxtension / ngxtension-platform

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

[Inject Migration Enhancement]: Add ES Private Field notation support #377

Closed ilirbeqirii closed 2 months ago

ilirbeqirii commented 2 months ago

When migrating from constructor-based to inject-based DI, add a new option, hence enhancement, to replace the TS private access modifier with ES #private fields.

exequiel09 commented 2 months ago

I don't recommend using private fields when you have users using Safari < 16.4. It might be a good option to have it but we have to have some form of warning or updating the browserlist.

See https://riegler.fr/blog/2024-05-17-private-fields-downleveling/

ilirbeqirii commented 2 months ago

This issue’s purpose is to add that new feature to the schematic, its on the user if he decides to support them during conversion or not.

Article you shared, its a really good one but I think it should not stop us from having this feature supported.

For the warning, I will discuss it with maintainers 🙌