Skip to content

Commit 27d3949

Browse files
authored
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.
1 parent 9eb589e commit 27d3949

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lib/index.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@
1818
* Parent of `element`.
1919
* @returns {boolean | null | undefined}
2020
* Whether to allow `element` (default: `false`).
21-
*
21+
*/
22+
23+
/**
2224
* @typedef {Partial<JsxRuntimeComponents>} Components
2325
* Map tag names to components.
24-
*
26+
*/
27+
28+
/**
2529
* @typedef Deprecation
2630
* Deprecation.
2731
* @property {string} from
@@ -30,7 +34,9 @@
3034
* ID in readme.
3135
* @property {keyof Options} [to]
3236
* New field.
33-
*
37+
*/
38+
39+
/**
3440
* @typedef Options
3541
* Configuration.
3642
* @property {AllowElement | null | undefined} [allowElement]
@@ -62,7 +68,9 @@
6268
* with `unwrapDisallowed` the element itself is replaced by its children.
6369
* @property {UrlTransform | null | undefined} [urlTransform]
6470
* Change URLs (default: `defaultUrlTransform`)
65-
*
71+
*/
72+
73+
/**
6674
* @callback UrlTransform
6775
* Transform all URLs.
6876
* @param {string} url

0 commit comments

Comments
 (0)