Skip to content

Commit 8b5dac0

Browse files
committed
Refactor code-style
1 parent 95be572 commit 8b5dac0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
* @typedef {Omit<Comment, 'value'> & {value: {stitch: Node}}} Stitch
1919
*
2020
* @typedef Options
21-
* @property {Array.<string>} [passThrough]
21+
* @property {Array<string>} [passThrough]
2222
* List of custom hast node types to pass through (keep) in hast.
2323
* If the passed through nodes have children, those children are expected to
2424
* be hast and will be handled.
2525
*
2626
* @typedef HiddenTokenizer
27-
* @property {Array.<HiddenLocationTracker>} __mixins
27+
* @property {Array<HiddenLocationTracker>} __mixins
2828
* Way too simple, but works for us.
2929
* @property {HiddenPreprocessor} preprocessor
3030
* @property {(value: string) => void} write
3131
* @property {() => number} _consume
32-
* @property {Array.<HiddenToken>} tokenQueue
32+
* @property {Array<HiddenToken>} tokenQueue
3333
* @property {string} state
3434
* @property {string} returnState
3535
* @property {number} charRefCode
36-
* @property {Array.<number>} tempBuff
36+
* @property {Array<number>} tempBuff
3737
* @property {Function} _flushCodePointsConsumedAsCharacterReference
3838
* @property {string} lastStartTagName
3939
* @property {number} consumedAfterSnapshot
@@ -44,14 +44,14 @@
4444
* @property {Function} NAMED_CHARACTER_REFERENCE_STATE
4545
* @property {Function} NUMERIC_CHARACTER_REFERENCE_END_STATE
4646
*
47-
* @typedef {Object.<string, unknown> & {location: P5Location}} HiddenToken
47+
* @typedef {Record<string, unknown> & {location: P5Location}} HiddenToken
4848
*
4949
* @typedef HiddenPreprocessor
5050
* @property {string|undefined} html
5151
* @property {number} pos
5252
* @property {number} lastGapPos
5353
* @property {number} lastCharPos
54-
* @property {Array.<number>} gapStack
54+
* @property {Array<number>} gapStack
5555
* @property {boolean} skipNextNewLine
5656
* @property {boolean} lastChunkWritten
5757
* @property {boolean} endOfChunkHit
@@ -239,7 +239,7 @@ export const raw =
239239
}
240240

241241
/**
242-
* @param {Content[]} nodes
242+
* @param {Array<Content>} nodes
243243
* @returns {void}
244244
*/
245245
function all(nodes) {
@@ -469,7 +469,7 @@ function startTag(node) {
469469

470470
/**
471471
* @param {Element} node
472-
* @returns {Array.<P5Attribute>}
472+
* @returns {Array<P5Attribute>}
473473
*/
474474
function attributes(node) {
475475
return toParse5({

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Given a [**hast**][hast] [*tree*][tree] and an optional [vfile][] (for
7676
###### `options.passThrough`
7777

7878
List of custom hast node types to pass through (keep) in hast
79-
(`Array.<string>`, default: `[]`).
79+
(`Array<string>`, default: `[]`).
8080
If the passed through nodes have children, those children are expected to be
8181
hast and will be handled.
8282

0 commit comments

Comments
 (0)