11/**
2- * @typedef {import('hast').Root } HastRoot
3- * @typedef {import('hast').Element } HastElement
2+ * @typedef {import('hast').Root } Root
3+ * @typedef {import('hast').Element } Element
44 * @typedef {import('hast').Properties } Properties
5- * @typedef {HastRoot['children'][number] } HastChild
6- * @typedef {import('property-information').html['property'][string] } Info
7- * @typedef {typeof import('property-information').html } Schema
8- */
9-
10- /**
11- * @typedef {HastRoot|HastElement } HResult
5+ * @typedef {Root['children'][number] } Child
6+ * @typedef {Child|Root } Node
7+ * @typedef {import('property-information').Info } Info
8+ * @typedef {import('property-information').Schema } Schema
9+ *
10+ * @typedef {Root|Element } HResult
1211 * @typedef {string|number } HStyleValue
1312 * @typedef {Object.<string, HStyleValue> } HStyle
1413 * @typedef {string|number|boolean|null|undefined } HPrimitiveValue
1716 * @typedef {{[property: string]: HPropertyValue|HStyle} } HProperties
1817 *
1918 * @typedef {string|number|null|undefined } HPrimitiveChild
20- * @typedef {HastChild|HastRoot } HNodeChild
21- * @typedef {Array.<HPrimitiveChild|HNodeChild> } HArrayChild
22- * @typedef {HPrimitiveChild|HNodeChild|HArrayChild } HChild
19+ * @typedef {Array.<Node|HPrimitiveChild> } HArrayChild
20+ * @typedef {Node|HPrimitiveChild|HArrayChild } HChild
2321 */
2422
2523import { find , normalize } from 'property-information'
@@ -42,10 +40,10 @@ export function core(schema, defaultTagName, caseSensitive) {
4240 const h =
4341 /**
4442 * @type {{
45- * (): HastRoot
46- * (selector: null|undefined, ...children: HChild[]): HastRoot
47- * (selector: string, properties: HProperties, ...children: HChild[]): HastElement
48- * (selector: string, ...children: HChild[]): HastElement
43+ * (): Root
44+ * (selector: null|undefined, ...children: HChild[]): Root
45+ * (selector: string, properties: HProperties, ...children: HChild[]): Element
46+ * (selector: string, ...children: HChild[]): Element
4947 * }}
5048 */
5149 (
@@ -59,7 +57,7 @@ export function core(schema, defaultTagName, caseSensitive) {
5957 */
6058 function ( selector , properties , ...children ) {
6159 var index = - 1
62- /** @type {HResult|HastElement } */
60+ /** @type {HResult } */
6361 var node
6462 /** @type {string } */
6563 var key
@@ -202,7 +200,7 @@ function addProperty(schema, properties, key, value) {
202200}
203201
204202/**
205- * @param {Array.<HastChild > } nodes
203+ * @param {Array.<Child > } nodes
206204 * @param {HChild } value
207205 * @returns {void }
208206 */
0 commit comments