1515 * @typedef EmbeddedHastFields
1616 * @property {string } [hName] Defines the tag name of an element
1717 * @property {Properties } [hProperties] Defines the properties of an element
18- * @property {Array. <Content> } [hChildren] Defines the (hast) children of an element
18+ * @property {Array<Content> } [hChildren] Defines the (hast) children of an element
1919 *
20- * @typedef {Object. <string, unknown> & EmbeddedHastFields } Data unist data with embedded hast fields
20+ * @typedef {Record <string, unknown> & EmbeddedHastFields } Data unist data with embedded hast fields
2121 *
2222 * @typedef {MdastNode & {data?: Data} } NodeWithData unist node with embedded hast data
2323 *
2424 * @callback Handler
2525 * @param {H } h Handle context
2626 * @param {any } node mdast node to handle
2727 * @param {Parent|null } parent Parent of `node`
28- * @returns {Content|Array. <Content>|null|undefined } hast node
28+ * @returns {Content|Array<Content>|null|undefined } hast node
2929 *
3030 * @callback HFunctionProps
3131 * @param {MdastNode|PositionLike|null|undefined } node mdast node or unist position
3232 * @param {string } tagName HTML tag name
3333 * @param {Properties } props Properties
34- * @param {Array. <Content>? } [children] hast content
34+ * @param {Array<Content>? } [children] hast content
3535 * @returns {Element }
3636 *
3737 * @callback HFunctionNoProps
3838 * @param {MdastNode|PositionLike|null|undefined } node mdast node or unist position
3939 * @param {string } tagName HTML tag name
40- * @param {Array. <Content>? } [children] hast content
40+ * @param {Array<Content>? } [children] hast content
4141 * @returns {Element }
4242 *
4343 * @typedef HFields
4646 * @property {string } footnoteLabel Label to use to introduce the footnote section
4747 * @property {string } footnoteBackLabel Label to use to go back to a footnote call from the footnote section
4848 * @property {(identifier: string) => Definition|null } definition Definition cache
49- * @property {Object. <string, FootnoteDefinition> } footnoteById Footnote cache
50- * @property {Array. <string> } footnoteOrder Order in which footnotes occur
51- * @property {Record. <string, number> } footnoteCounts Counts the same footnote was used
49+ * @property {Record <string, FootnoteDefinition> } footnoteById Footnote cache
50+ * @property {Array<string> } footnoteOrder Order in which footnotes occur
51+ * @property {Record<string, number> } footnoteCounts Counts the same footnote was used
5252 * @property {Handlers } handlers Applied handlers
5353 * @property {Handler } unknownHandler Handler for any none not in `passThrough` or otherwise handled
5454 * @property {(left: NodeWithData|PositionLike|null|undefined, right: Content) => Content } augment Like `h` but lower-level and usable on non-elements.
55- * @property {Array. <string> } passThrough List of node types to pass through untouched (except for their children).
55+ * @property {Array<string> } passThrough List of node types to pass through untouched (except for their children).
5656 *
5757 * @typedef Options
5858 * @property {boolean } [allowDangerousHtml=false]
7979 * Change it if you’re authoring in a different language.
8080 * @property {Handlers } [handlers]
8181 * Object mapping mdast nodes to functions handling them
82- * @property {Array. <string> } [passThrough]
82+ * @property {Array<string> } [passThrough]
8383 * List of custom mdast node types to pass through (keep) in hast
8484 * @property {Handler } [unknownHandler]
8585 * Handler for all unknown nodes.
8686 *
87- * @typedef {Record. <string, Handler> } Handlers
87+ * @typedef {Record<string, Handler> } Handlers
8888 * Map of node types to handlers
8989 * @typedef {HFunctionProps & HFunctionNoProps & HFields } H
9090 * Handle context
@@ -110,7 +110,7 @@ const own = {}.hasOwnProperty
110110function factory ( tree , options ) {
111111 const settings = options || { }
112112 const dangerous = settings . allowDangerousHtml || false
113- /** @type {Object. <string, FootnoteDefinition> } */
113+ /** @type {Record <string, FootnoteDefinition> } */
114114 const footnoteById = { }
115115
116116 h . dangerous = dangerous
@@ -122,9 +122,9 @@ function factory(tree, options) {
122122 h . footnoteBackLabel = settings . footnoteBackLabel || 'Back to content'
123123 h . definition = definitions ( tree )
124124 h . footnoteById = footnoteById
125- /** @type {Array. <string> } */
125+ /** @type {Array<string> } */
126126 h . footnoteOrder = [ ]
127- /** @type {Record. <string, number> } */
127+ /** @type {Record<string, number> } */
128128 h . footnoteCounts = { }
129129 h . augment = augment
130130 h . handlers = { ...handlers , ...settings . handlers }
0 commit comments