In my TypeScript Next.js application, I rely on Visual Studio Code for coding purposes.
One feature that I particularly enjoy is the ability to add a JSDoc annotation of @deprecated
above a function, which then visually strikes through the function name to serve as a warning for all usages:
https://i.sstatic.net/cSPno.png
There are times when I consider marking functions as @deprecated
just to ensure that users pay extra attention and read the comments before using them.
However, I hesitate to use the term "deprecated" when I have no intention of removing the function entirely.
Instead, I might want to draw attention to a better alternative by stating: "Rather than using this function, you should consider using [this other function] instead."
Is there an alternative annotation available for this purpose? If not, how could I create one?
I would like all usages to automatically change the appearance of the function name to emphasize the message (either through a strike-through or another styling option).