Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(5326): Combining destructuring with parameter properties #44912

Closed
wants to merge 0 commits into from

Conversation

a-tarasyuk
Copy link
Contributor

@a-tarasyuk a-tarasyuk commented Jul 6, 2021

Fixes #5326

Accepting PRs to implement constructor(public {name1, name2}) forms (i.e. no public / private etc inside the {}s).
#5326 (comment), #5326 (comment)

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jul 6, 2021
@sandersn sandersn requested review from rbuckton and sandersn August 16, 2021 22:12
@ianldgs
Copy link

ianldgs commented Aug 23, 2021

I understand that this is how @RyanCavanaugh "approved" this feature to be implemented, but that was a long time ago. Paradigms have changed: nowadays, immutability is a much hotter topic than in the past when getters/setters and encapsulation were the most accepted concept for class properties.

If TypeScript goes towards this direction, I don't see a way to extend this feature to represent:
1: readonly fields and 2: together with public, some fields that are private and some maybe even protected.

Any thoughts?

In any case, @a-tarasyuk I really appreciate someone taking the initiative to start the work on this, let me know if I can also contribute!

@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #5326. If you can get it accepted, this PR will have a better chance of being reviewed.

@a-tarasyuk
Copy link
Contributor Author

a-tarasyuk commented Apr 1, 2022

@ianldgs I think it would be better to post your comment on #5326 to continue the discussion there. This PR will not be merged, I'll later reset the changes and close the PR.

@sandersn
Copy link
Member

sandersn commented Apr 6, 2022

@a-tarasyuk it sounds like you're going to abandon this PR?

I have to say that we're not excited about doing work on parameter properties, since they're not ES standard. So it might be the right thing.

@a-tarasyuk
Copy link
Contributor Author

@sandersn closed. I think that the label Help Wanted should be changed to In Discussion/Awaiting More Feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Combining destructuring with parameter properties
5 participants