9
9
*
10
10
* @typedef {Root|Element } HResult
11
11
* @typedef {string|number } HStyleValue
12
- * @typedef {Object. <string, HStyleValue> } HStyle
12
+ * @typedef {Record <string, HStyleValue> } HStyle
13
13
* @typedef {string|number|boolean|null|undefined } HPrimitiveValue
14
- * @typedef {Array. <string|number> } HArrayValue
14
+ * @typedef {Array<string|number> } HArrayValue
15
15
* @typedef {HPrimitiveValue|HArrayValue } HPropertyValue
16
16
* @typedef {{[property: string]: HPropertyValue|HStyle} } HProperties
17
17
*
18
18
* @typedef {string|number|null|undefined } HPrimitiveChild
19
- * @typedef {Array. <Node|HPrimitiveChild> } HArrayChild
19
+ * @typedef {Array<Node|HPrimitiveChild> } HArrayChild
20
20
* @typedef {Node|HPrimitiveChild|HArrayChild } HChild
21
21
*/
22
22
@@ -32,7 +32,7 @@ const own = {}.hasOwnProperty
32
32
/**
33
33
* @param {Schema } schema
34
34
* @param {string } defaultTagName
35
- * @param {Array. <string> } [caseSensitive]
35
+ * @param {Array<string> } [caseSensitive]
36
36
*/
37
37
export function core ( schema , defaultTagName , caseSensitive ) {
38
38
const adjust = caseSensitive && createAdjustMap ( caseSensitive )
@@ -41,9 +41,9 @@ export function core(schema, defaultTagName, caseSensitive) {
41
41
/**
42
42
* @type {{
43
43
* (): Root
44
- * (selector: null|undefined, ...children: HChild[] ): Root
45
- * (selector: string, properties?: HProperties, ...children: HChild[] ): Element
46
- * (selector: string, ...children: HChild[] ): Element
44
+ * (selector: null|undefined, ...children: Array< HChild> ): Root
45
+ * (selector: string, properties?: HProperties, ...children: Array< HChild> ): Element
46
+ * (selector: string, ...children: Array< HChild> ): Element
47
47
* }}
48
48
*/
49
49
(
@@ -52,7 +52,7 @@ export function core(schema, defaultTagName, caseSensitive) {
52
52
*
53
53
* @param {string|null } [selector]
54
54
* @param {HProperties|HChild } [properties]
55
- * @param {HChild[] } children
55
+ * @param {Array< HChild> } children
56
56
* @returns {HResult }
57
57
*/
58
58
function ( selector , properties , ...children ) {
@@ -179,7 +179,7 @@ function addProperty(schema, properties, key, value) {
179
179
}
180
180
181
181
if ( Array . isArray ( result ) ) {
182
- /** @type {Array. <string|number> } */
182
+ /** @type {Array<string|number> } */
183
183
const finalResult = [ ]
184
184
185
185
while ( ++ index < result . length ) {
@@ -200,7 +200,7 @@ function addProperty(schema, properties, key, value) {
200
200
}
201
201
202
202
/**
203
- * @param {Array. <Child> } nodes
203
+ * @param {Array<Child> } nodes
204
204
* @param {HChild } value
205
205
* @returns {void }
206
206
*/
@@ -256,7 +256,7 @@ function parsePrimitive(info, name, value) {
256
256
* @returns {string }
257
257
*/
258
258
function style ( value ) {
259
- /** @type {Array. <string> } */
259
+ /** @type {Array<string> } */
260
260
const result = [ ]
261
261
/** @type {string } */
262
262
let key
@@ -271,11 +271,11 @@ function style(value) {
271
271
}
272
272
273
273
/**
274
- * @param {Array. <string> } values
275
- * @returns {Object. <string, string> }
274
+ * @param {Array<string> } values
275
+ * @returns {Record <string, string> }
276
276
*/
277
277
function createAdjustMap ( values ) {
278
- /** @type {Object. <string, string> } */
278
+ /** @type {Record <string, string> } */
279
279
const result = { }
280
280
let index = - 1
281
281
0 commit comments