When we decorate a function variable, class or anything with @deprecated. By doing that, VSCode will understand and show it with a strikethrough style:
/**
* @deprecated This method is deprecated. Please `render` instead
*/
function oldRender(){}
function render(){}
const TestLib = {
oldRender,
render
};
TestLib.oldRender(); // <strikethrough and deprecate message
And it looks like this:
![@deprecated style](/_vercel/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2Fgc3hakk3%2Fproduction%2F6d5f7d2c1833668b005329479a67c16f4564d2d6-638x286.png%3Fw%3D638%26h%3D286%26auto%3Dformat&w=640&q=100)