|
18 | 18 | * @typedef {Omit<Comment, 'value'> & {value: {stitch: Node}}} Stitch
|
19 | 19 | *
|
20 | 20 | * @typedef Options
|
21 |
| - * @property {Array.<string>} [passThrough] |
| 21 | + * @property {Array<string>} [passThrough] |
22 | 22 | * List of custom hast node types to pass through (keep) in hast.
|
23 | 23 | * If the passed through nodes have children, those children are expected to
|
24 | 24 | * be hast and will be handled.
|
25 | 25 | *
|
26 | 26 | * @typedef HiddenTokenizer
|
27 |
| - * @property {Array.<HiddenLocationTracker>} __mixins |
| 27 | + * @property {Array<HiddenLocationTracker>} __mixins |
28 | 28 | * Way too simple, but works for us.
|
29 | 29 | * @property {HiddenPreprocessor} preprocessor
|
30 | 30 | * @property {(value: string) => void} write
|
31 | 31 | * @property {() => number} _consume
|
32 |
| - * @property {Array.<HiddenToken>} tokenQueue |
| 32 | + * @property {Array<HiddenToken>} tokenQueue |
33 | 33 | * @property {string} state
|
34 | 34 | * @property {string} returnState
|
35 | 35 | * @property {number} charRefCode
|
36 |
| - * @property {Array.<number>} tempBuff |
| 36 | + * @property {Array<number>} tempBuff |
37 | 37 | * @property {Function} _flushCodePointsConsumedAsCharacterReference
|
38 | 38 | * @property {string} lastStartTagName
|
39 | 39 | * @property {number} consumedAfterSnapshot
|
|
44 | 44 | * @property {Function} NAMED_CHARACTER_REFERENCE_STATE
|
45 | 45 | * @property {Function} NUMERIC_CHARACTER_REFERENCE_END_STATE
|
46 | 46 | *
|
47 |
| - * @typedef {Object.<string, unknown> & {location: P5Location}} HiddenToken |
| 47 | + * @typedef {Record<string, unknown> & {location: P5Location}} HiddenToken |
48 | 48 | *
|
49 | 49 | * @typedef HiddenPreprocessor
|
50 | 50 | * @property {string|undefined} html
|
51 | 51 | * @property {number} pos
|
52 | 52 | * @property {number} lastGapPos
|
53 | 53 | * @property {number} lastCharPos
|
54 |
| - * @property {Array.<number>} gapStack |
| 54 | + * @property {Array<number>} gapStack |
55 | 55 | * @property {boolean} skipNextNewLine
|
56 | 56 | * @property {boolean} lastChunkWritten
|
57 | 57 | * @property {boolean} endOfChunkHit
|
@@ -239,7 +239,7 @@ export const raw =
|
239 | 239 | }
|
240 | 240 |
|
241 | 241 | /**
|
242 |
| - * @param {Content[]} nodes |
| 242 | + * @param {Array<Content>} nodes |
243 | 243 | * @returns {void}
|
244 | 244 | */
|
245 | 245 | function all(nodes) {
|
@@ -469,7 +469,7 @@ function startTag(node) {
|
469 | 469 |
|
470 | 470 | /**
|
471 | 471 | * @param {Element} node
|
472 |
| - * @returns {Array.<P5Attribute>} |
| 472 | + * @returns {Array<P5Attribute>} |
473 | 473 | */
|
474 | 474 | function attributes(node) {
|
475 | 475 | return toParse5({
|
|
0 commit comments