Skip to main content

@deprecated

Syntax

@deprecated
@deprecated explanation

Overview

DeprecatedSymbols tagged with @deprecated are no longer recommended. Always provide a migration path — link to the replacement with {@link}.

@deprecated marks a symbol as no longer recommended for use. Provide a migration message explaining what to use instead.

TypeScript Supported

TypeScript recognises @deprecated and flags usages of deprecated symbols with a strikethrough in editors.

TypeScript docs →

Example

/**
* @deprecated Use {@link fetchUser} instead.
*/
function getUser(id) {}

/**
* Fetch a user from the API.
* @param {string} id
* @returns {Promise<User>}
*/
async function fetchUser(id) {}

See also

Official reference: jsdoc.app/tags-deprecated