Add deprecated related feature#38523
Conversation
|
Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary |
|
@typescript-bot pack this. |
|
@typescript-bot pack this. |
|
Hey @Kingwl, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build. |
|
Ping, need some help. Please take a look |
|
Another problem is, where's the line: a.b.c.d // c is deprecatedWhat is the expected behavior?
And if: a.b.c.d // c and d is deprecatedWhat is the expected behavior
|
|
Does the protocol looks good?I'm not sure🤷♂️ |
|
I believe this would also fix #33093 |
|
Finally, It passed tests. I'll add more tests soon. |
|
Hey @Kingwl, I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build. |
src/compiler/binder.ts
Outdated
| } | ||
| } | ||
|
|
||
| symbol.isDeprecated = symbol.isDeprecated || isDeprecated; |
There was a problem hiding this comment.
SHould this be SymbolFlags instead?
There was a problem hiding this comment.
I agree -- if there's space there. I think the limit is 29 so there's 1 left.
There was a problem hiding this comment.
Alternatively, making this a ModifierFlag would go well with public/@public et al. It would also go better with getNodeModifiers in services.
|
@Kingwl Here they are:Comparison Report - master..38523
System
Hosts
Scenarios
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sandersn
left a comment
There was a problem hiding this comment.
So to recap: we now have NodeFlags.Deprecated, SymbolFlags.Deprecated and ModifierFlags.Deprecated.
I would say we are well-positioned to deprecate things now. =)
|
It's in! Thanks so much for your persistence @Kingwl! |
|
I've not followed this feature much, so while I've done a quick read over the discussions, linked tickets & searched the issue tracker I still could have missed something or misunderstood entirely, but just in case: Has anyone raised the behaviour of Happy to open a new issue for discussion. Just found #14619, which would resolve this problem. |
|
@typescript-bot pack this. |
|
Does it works with a comment which explain why something is deprecated? VSCode should than show that message. |
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to #9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to expo#9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.
|
Is there a way to suppress this warning using |
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to expo#9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.
# Why _This follows the TS 4.0 update PR: #9960_ Typescript 4.0 comes with support for `@deprecated` annotations, which gives nice VS Code (and probably other IDE) messages informing users about API deprecation. It also marks deprecated methods/properties with ~~Strikethrough~~. See [this](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#deprecated-support) and microsoft/TypeScript#38523 # How - Added appropriate annotations to every possible deprecated Expo API that I found. - Updated existing comments to play nice with VS Code messages Also, added note about dead code in Notifications, which is related to #9563 (I forgot to add it then) > Not sure what to do with changelogs ❓ # Test Plan Tested messages in VS Code with _TS 4.0.2_ enabled.

Fixes #390
Fixes #33092
Fixes #33093
After read the codebase, I found below things need todo:
completions with symbol tag
workspace symbol with symbol tag
document symbol with symbol tag
call hierarchy with symbol tag
DiagnosticTags
current state:

Others need to do: