-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Observe @private and @protected in JSDocs for Property Suggestions #14009
Comments
Any update on this? |
This would be great to have |
Hello, Any news about this one? I got the same issue working with last TypeScript version (3.3333) I can access my protected property from the instance. |
This seems to keep getting punted. Now that TS 3.4.5 is out I expect this to be punted to 3.5.0? Granted this is not a massive pain right now, but it would be a really great feature to have supported by TS out of the box. |
|
It will work as much like |
@sandersn Okay thanks for info. I have a use case where I need to affect just the code completion. (Sth, like |
So, no completions, but also no errors when you use it? It sounds like you want |
Here's some documentation for future me to explain why this is surprisingly hard to do well. There are four solutions I've come up with:
(2) doesn't work. (3) might be worth trying if I can find an appropriate assert to prevent mistakes. (1) is a good fallback. (4) is probably not worth it (and may be practically impossible). |
Additionally it would great if JavaScript proposal class properties (which is at stage 3) could handled correctly as well, eg: class Something {
#private = 'foo'
} |
Was this feature implemented already, or will it be in the near future? |
Looks like 3c5ecc2 is in 3.8 and above. |
Hmm.. does that mean that if my VsCode uses TypeScript 3.9.4, I should have access to this feature? Cause I don't:) |
Install JavaScript and TypeScript Nightly: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next |
I've just done it, but e.g. |
Double check your |
For me, this works ok with |
Thanks. Did that in my |
From: microsoft/vscode#5163
TypeScript Version: 2.2.0- 20170210
Code
Expected behavior:
When triggering suggestions on instances of
Foo
, an entry forabc
is not returned.Actual behavior:
All members of
Foo
are returned. The@private
annotation seems to be ignored.The text was updated successfully, but these errors were encountered: