28
28
* @callback Handler
29
29
* @param {Context } ctx
30
30
* @param {P5Node } node
31
- * @param {Array. <Child> } [children]
31
+ * @param {Array<Child> } [children]
32
32
* @returns {Node }
33
33
*
34
34
* @typedef Options
@@ -102,7 +102,7 @@ function transform(ctx, ast) {
102
102
/** @type {Handler } */
103
103
// @ts -expect-error: index is fine.
104
104
const fn = own . call ( map , ast . nodeName ) ? map [ ast . nodeName ] : element
105
- /** @type {Array. <Child>|undefined } */
105
+ /** @type {Array<Child>|undefined } */
106
106
let children
107
107
108
108
// Element.
@@ -134,12 +134,12 @@ function transform(ctx, ast) {
134
134
* Transform children.
135
135
*
136
136
* @param {Context } ctx
137
- * @param {Array. <P5Node> } children
138
- * @returns {Array. <Child> }
137
+ * @param {Array<P5Node> } children
138
+ * @returns {Array<Child> }
139
139
*/
140
140
function nodes ( ctx , children ) {
141
141
let index = - 1
142
- /** @type {Array. <Child> } */
142
+ /** @type {Array<Child> } */
143
143
const result = [ ]
144
144
145
145
while ( ++ index < children . length ) {
@@ -156,7 +156,7 @@ function nodes(ctx, children) {
156
156
*
157
157
* @type {Handler }
158
158
* @param {P5Document } ast
159
- * @param {Array. <Child> } children
159
+ * @param {Array<Child> } children
160
160
* @returns {Root }
161
161
*/
162
162
function root ( ctx , ast , children ) {
@@ -217,13 +217,13 @@ function comment(_, ast) {
217
217
*
218
218
* @type {Handler }
219
219
* @param {P5Element } ast
220
- * @param {Array. <ElementChild> } children
220
+ * @param {Array<ElementChild> } children
221
221
* @returns {Element }
222
222
*/
223
223
function element ( ctx , ast , children ) {
224
224
const fn = ctx . schema . space === 'svg' ? s : h
225
225
let index = - 1
226
- /** @type {Object. <string, string> } */
226
+ /** @type {Record <string, string> } */
227
227
const props = { }
228
228
229
229
while ( ++ index < ast . attrs . length ) {
@@ -280,7 +280,7 @@ function createLocation(ctx, node, location) {
280
280
}
281
281
282
282
if ( ctx . verbose ) {
283
- /** @type {Object. <string, Position|null> } */
283
+ /** @type {Record <string, Position|null> } */
284
284
const props = { }
285
285
/** @type {string } */
286
286
let key
0 commit comments