Skip to content
Advertisement

How to mark a property deprecated in a @typedef?

I would like to mark a property (for example, qux below) as deprecated:

JavaScript

I should mention, I’d like to do this in a JSDoc comment, not using TypeScript.

Advertisement

Answer

According to Issue#131 over at tsdoc, you can actually use @deprecated on properties, you just have to set it inside the object (works with JS as well).

For e.g.:

JavaScript

Results in:

enter image description here


In classes for e.g.:

JavaScript

Results:

enter image description here

When using the deprecated property. enter image description here

Advertisement