@@ -915,7 +915,7 @@ test('should skip nodes that are defined as disallowed', () => {
915915 hr : { input : '\n-----\nAnd with that...' , shouldNotContain : '<hr' }
916916 }
917917
918- /** @type {string[] } */
918+ /** @type {Array< string> } */
919919 const inputs = [ ]
920920 /** @type {keyof samples } */
921921 let key
@@ -1008,7 +1008,7 @@ test('should be able to override components', () => {
10081008 const heading = ( level ) => {
10091009 /**
10101010 * @param {object } props
1011- * @param {ReactNode[] } props.children
1011+ * @param {Array< ReactNode> } props.children
10121012 */
10131013 const component = ( props ) => (
10141014 < span className = { `heading level-${ level } ` } > { props . children } </ span >
@@ -1220,7 +1220,7 @@ test('should support formatting at the start of a GFM tasklist (GH-494)', () =>
12201220test ( 'should support aria properties' , ( ) => {
12211221 const input = 'c'
12221222
1223- /** @type {import('unified').Plugin<void[] , Root> } */
1223+ /** @type {import('unified').Plugin<Array< void> , Root> } */
12241224 const plugin = ( ) => ( root ) => {
12251225 root . children . unshift ( {
12261226 type : 'element' ,
@@ -1238,7 +1238,7 @@ test('should support aria properties', () => {
12381238test ( 'should support data properties' , ( ) => {
12391239 const input = 'b'
12401240
1241- /** @type {import('unified').Plugin<void[] , Root> } */
1241+ /** @type {import('unified').Plugin<Array< void> , Root> } */
12421242 const plugin = ( ) => ( root ) => {
12431243 root . children . unshift ( {
12441244 type : 'element' ,
@@ -1256,7 +1256,7 @@ test('should support data properties', () => {
12561256test ( 'should support comma separated properties' , ( ) => {
12571257 const input = 'c'
12581258
1259- /** @type {import('unified').Plugin<void[] , Root> } */
1259+ /** @type {import('unified').Plugin<Array< void> , Root> } */
12601260 const plugin = ( ) => ( root ) => {
12611261 root . children . unshift ( {
12621262 type : 'element' ,
@@ -1274,7 +1274,7 @@ test('should support comma separated properties', () => {
12741274test ( 'should support `style` properties' , ( ) => {
12751275 const input = 'a'
12761276
1277- /** @type {import('unified').Plugin<void[] , Root> } */
1277+ /** @type {import('unified').Plugin<Array< void> , Root> } */
12781278 const plugin = ( ) => ( root ) => {
12791279 root . children . unshift ( {
12801280 type : 'element' ,
@@ -1292,7 +1292,7 @@ test('should support `style` properties', () => {
12921292test ( 'should support `style` properties w/ vendor prefixes' , ( ) => {
12931293 const input = 'a'
12941294
1295- /** @type {import('unified').Plugin<void[] , Root> } */
1295+ /** @type {import('unified').Plugin<Array< void> , Root> } */
12961296 const plugin = ( ) => ( root ) => {
12971297 root . children . unshift ( {
12981298 type : 'element' ,
@@ -1310,7 +1310,7 @@ test('should support `style` properties w/ vendor prefixes', () => {
13101310test ( 'should support broken `style` properties' , ( ) => {
13111311 const input = 'a'
13121312
1313- /** @type {import('unified').Plugin<void[] , Root> } */
1313+ /** @type {import('unified').Plugin<Array< void> , Root> } */
13141314 const plugin = ( ) => ( root ) => {
13151315 root . children . unshift ( {
13161316 type : 'element' ,
@@ -1328,7 +1328,7 @@ test('should support broken `style` properties', () => {
13281328test ( 'should support SVG elements' , ( ) => {
13291329 const input = 'a'
13301330
1331- /** @type {import('unified').Plugin<void[] , Root> } */
1331+ /** @type {import('unified').Plugin<Array< void> , Root> } */
13321332 const plugin = ( ) => ( root ) => {
13331333 root . children . unshift ( {
13341334 type : 'element' ,
@@ -1367,7 +1367,7 @@ test('should support SVG elements', () => {
13671367test ( 'should support (ignore) comments' , ( ) => {
13681368 const input = 'a'
13691369
1370- /** @type {import('unified').Plugin<void[] , Root> } */
1370+ /** @type {import('unified').Plugin<Array< void> , Root> } */
13711371 const plugin = ( ) => ( root ) => {
13721372 root . children . unshift ( { type : 'comment' , value : 'things!' } )
13731373 }
@@ -1380,7 +1380,7 @@ test('should support (ignore) comments', () => {
13801380test ( 'should support table cells w/ style' , ( ) => {
13811381 const input = '| a |\n| :- |'
13821382
1383- /** @type {import('unified').Plugin<void[] , Root> } */
1383+ /** @type {import('unified').Plugin<Array< void> , Root> } */
13841384 const plugin = ( ) => ( root ) => {
13851385 visit ( root , { type : 'element' , tagName : 'th' } , ( node ) => {
13861386 node . properties = { ...node . properties , style : 'color: red' }
@@ -1398,7 +1398,7 @@ test('should support table cells w/ style', () => {
13981398
13991399test ( 'should crash on a plugin replacing `root`' , ( ) => {
14001400 const input = 'a'
1401- /** @type {import('unified').Plugin<void[] , Root> } */
1401+ /** @type {import('unified').Plugin<Array< void> , Root> } */
14021402 // @ts -expect-error: runtime.
14031403 const plugin = ( ) => ( ) => ( { type : 'comment' , value : 'things!' } )
14041404 assert . throws ( ( ) => {
0 commit comments