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

Add JSDoc @deprecated instead of [deprecated] #1576

Closed
davidbielik opened this issue Oct 8, 2022 · 2 comments
Closed

Add JSDoc @deprecated instead of [deprecated] #1576

davidbielik opened this issue Oct 8, 2022 · 2 comments

Comments

@davidbielik
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I noticed the comments on API fields prefix [deprecated], for example:

* [Deprecated] The amount to be collected per unit of the line item. If specified, must also pass `currency` and `name`.

This makes it hard to miss when looking in VScode at what's deprecated

Describe the solution you'd like

If you add @deprecated to the jsdoc comment:

/**
  * @deprecated
  * [Deprecated] Some description 
  */

Then the property will show a strike-through in the editor which should make it more obvious to developers when using deprecated properties/methods.

Before

image

After

image

It also makes it easier when referencing properties (for example, I added @deprecated in the definitions):

image

Describe alternatives you've considered

No response

Additional context

No response

@davidbielik
Copy link
Contributor Author

looks like there are already /** @deprecated */ fields, and maybe just a few are missing

@richardm-stripe
Copy link
Contributor

Hi @davidbielik, I agree with you though I suspect we will take no action here. The only docstrings with [Deprecated] are the ones that you have already noted in #1575 should be removed from the library, so likely that is how we will resolve this.

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

No branches or pull requests

2 participants