From 27d3949b31beb7aa7a6c0d3d4d34e6fd0965a7d3 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 2 Jan 2025 12:42:11 +0100 Subject: [PATCH] Separate all typedefs into their own JSDoc blocks (#878) Having them in the same block, can be problematic sometimes. For example when they contain `@template` tags. --- lib/index.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 6470cb8..b97d6ed 100644 --- a/lib/index.js +++ b/lib/index.js @@ -18,10 +18,14 @@ * Parent of `element`. * @returns {boolean | null | undefined} * Whether to allow `element` (default: `false`). - * + */ + +/** * @typedef {Partial} Components * Map tag names to components. - * + */ + +/** * @typedef Deprecation * Deprecation. * @property {string} from @@ -30,7 +34,9 @@ * ID in readme. * @property {keyof Options} [to] * New field. - * + */ + +/** * @typedef Options * Configuration. * @property {AllowElement | null | undefined} [allowElement] @@ -62,7 +68,9 @@ * with `unwrapDisallowed` the element itself is replaced by its children. * @property {UrlTransform | null | undefined} [urlTransform] * Change URLs (default: `defaultUrlTransform`) - * + */ + +/** * @callback UrlTransform * Transform all URLs. * @param {string} url