Skip to content

Commit

Permalink
Separate all typedefs into their own JSDoc blocks
Browse files Browse the repository at this point in the history
Having them in the same block, can be problematic sometimes. For
example when they contain `@template` tags.
  • Loading branch information
remcohaszing committed Dec 20, 2024
1 parent 9eb589e commit c582e3b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@
* Parent of `element`.
* @returns {boolean | null | undefined}
* Whether to allow `element` (default: `false`).
*
*/

/**
* @typedef {Partial<JsxRuntimeComponents>} Components
* Map tag names to components.
*
*/

/**
* @typedef Deprecation
* Deprecation.
* @property {string} from
Expand All @@ -30,7 +34,9 @@
* ID in readme.
* @property {keyof Options} [to]
* New field.
*
*/

/**
* @typedef Options
* Configuration.
* @property {AllowElement | null | undefined} [allowElement]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c582e3b

Please sign in to comment.