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

refactor : declare and initialize class property #2560

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

DongjaJ
Copy link
Contributor

@DongjaJ DongjaJ commented Oct 18, 2024

Description

[ What changed? Feel free to be brief. ]

Typescript class grammar allows the constructor to declare and initialize properties at the same time.

I applied it to continue in this PR

And I want to ask you one thing.

If you look at the second commit of this PR, there are properties that have public access designators. Shouldn't these properties be designated as private access designators?

Checklist

  • The base branch of this PR is dev, rather than main
  • The relevant docs, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. ]

Testing

[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change. ]

@sestinj
Copy link
Contributor

sestinj commented Oct 18, 2024

This is great! Yes, it looks like those public properties in the second commit should all be private

@DongjaJ
Copy link
Contributor Author

DongjaJ commented Oct 19, 2024

I modified the access designator from public to private

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants