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

Docs: usage of parameter properties as class members in constructor #3041

Open
anno1985 opened this issue Mar 12, 2024 · 0 comments
Open

Docs: usage of parameter properties as class members in constructor #3041

anno1985 opened this issue Mar 12, 2024 · 0 comments

Comments

@anno1985
Copy link

The docs don't seem to specify from what point onwards (after constructor signature or after constructor execution) parameter properties are available as class members - and hence don't seem to make any indication which of the following is "better":

constructor(private name: string) {
  console.log(this.name);
  console.log(name);
}
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

No branches or pull requests

1 participant