Skip to content

Commit 4b527a0

Browse files
committed
Refactor code-style
1 parent 9dd963a commit 4b527a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const blockOrCaption = convertElement([
112112
* @returns {string}
113113
*/
114114
export function toText(node, options = {}) {
115-
/** @type {Array.<HastChild>} */
115+
/** @type {Array<HastChild>} */
116116
// @ts-ignore looks like a parent.
117117
const children = node.children || []
118118
const block = blockOrCaption(node)
@@ -122,7 +122,7 @@ export function toText(node, options = {}) {
122122
breakAfter: false
123123
})
124124
let index = -1
125-
/** @type {Array.<string|BreakNumber>} */
125+
/** @type {Array<string|BreakNumber>} */
126126
let results
127127
/** @type {string|BreakNumber} */
128128
let value
@@ -180,7 +180,7 @@ export function toText(node, options = {}) {
180180
// characters as the maximum of the values in the required line break
181181
// count items.
182182
index = -1
183-
/** @type {Array.<string>} */
183+
/** @type {Array<string>} */
184184
const result = []
185185

186186
while (++index < results.length) {
@@ -205,7 +205,7 @@ export function toText(node, options = {}) {
205205
* @param {HastNode} node
206206
* @param {HastParent} parent
207207
* @param {CollectionOptions} options
208-
* @returns {Array.<string|BreakNumber>}
208+
* @returns {Array<string|BreakNumber>}
209209
*/
210210
function innerTextCollection(node, parent, options) {
211211
if (node.type === 'element') {
@@ -235,7 +235,7 @@ function collectElement(node, parent, options) {
235235
const whitespace = inferWhitespace(node, options)
236236
const children = node.children || []
237237
let index = -1
238-
/** @type {Array.<string|BreakNumber>} */
238+
/** @type {Array<string|BreakNumber>} */
239239
let items = []
240240
/** @type {BreakNumber|undefined} */
241241
let prefix
@@ -349,9 +349,9 @@ function collectElement(node, parent, options) {
349349
*/
350350
function collectText(node, options) {
351351
const value = String(node.value)
352-
/** @type {Array.<string>} */
352+
/** @type {Array<string>} */
353353
const lines = []
354-
/** @type {Array.<string>} */
354+
/** @type {Array<string>} */
355355
const result = []
356356
let start = 0
357357
let index = -1
@@ -452,7 +452,7 @@ function collectPreText(node) {
452452
* @returns {string}
453453
*/
454454
function trimAndCollapseSpacesAndTabs(value, breakBefore, breakAfter) {
455-
/** @type {Array.<string>} */
455+
/** @type {Array<string>} */
456456
const result = []
457457
let start = 0
458458
/** @type {RegExpMatchArray|null} */

0 commit comments

Comments
 (0)