When you change an exported/non-trivial API (or add new function parameters), update JSDoc so it is complete and directly helpful:
{type} and a short description of what the parameter controls.@deprecated and point to the replacement using a link (e.g., {@link NewSymbol}), not just plain text.Example (parameter documentation)
/**
* @param {any} node
* @param {number} [width] - Max/target label width used for wrapping calculations.
* @param {boolean} [addBackground=false] - Whether to apply the label background styling.
* @returns {Promise<SVGForeignObjectElement>}
*/
async function addHtmlLabel(node, width, addBackground = false) {
// ...
}
Example (deprecation documentation)
/**
* @deprecated Use {@link getBoundaries} instead
*/
export const getBoundarys = getBoundaries;
Enter the URL of a public GitHub repository