-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
TSification: mark fields as private/protected #2300
Comments
Note that some fields are I have used this convention at a few places (and I think other have too) having in mind the Dart definition of private, ie private member are library private in Dart (they can be accessed from within the same library which is essentially the same file in Angular as we use a 1-1 mapping). Edit: Oops didn't read your comment until the end ! |
I wouldn't mind taking a crack at this, I'll get started and check back here if I have questions :) |
See dart-archive/ts2dart#278 But this enforces too much. We don't have a good answer for marking fields/methods in TS as 'may be accessed anywhere in this file', we cannot currently make them private. In the meantime, a good next step would be a tslint check in the angular repo that any private method starts with underscore. It's better to enforce this way since TS-only contributors will still have the enforcement. |
@alexeagle I've created a PR on the lint thing: #5043 |
This is obsolete, and no longer relevant / actionable. To keep our issues clean, we are aggressively closing them. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
We have a convention from AtScript of prefixing privates with underscore. This is also needed so the ts2dart emit produces "private" fields/methods in Dart.
We should mark these actually private, so TypeScript can enforce it.
Notes:
.ts
has underscore prefix but isn't privateThe text was updated successfully, but these errors were encountered: