I would like to mark a property (for example, qux
below) as deprecated:
/**
@typedef {object} Foo
@property {string} bar
@property {symbol} qux - How to deprecate it?
@deprecated @property {symbol} qux2 - Doesn't work
@property {symbol} qux3 @deprecated - This marks the whole of Foo as deprecated
*/
I should mention, I'd like to do this in a JSDoc comment, not using TypeScript.
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.:
Results in:
In classes for e.g.:
Results:
When using the deprecated property.