File tree 2 files changed +37
-1
lines changed
2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,11 @@ const getFunctionParameterNames = (
275
275
throw new Error ( `Unsupported function signature format: \`${ param . type } \`.` ) ;
276
276
} ;
277
277
278
- return ( functionNode . params || functionNode . value . params ) . map ( ( param ) => {
278
+ if ( ! functionNode ) {
279
+ return [ ] ;
280
+ }
281
+
282
+ return ( functionNode . params || functionNode . value ?. params || [ ] ) . map ( ( param ) => {
279
283
return getParamName ( param ) ;
280
284
} ) ;
281
285
} ;
Original file line number Diff line number Diff line change @@ -3390,5 +3390,37 @@ export default {
3390
3390
] ,
3391
3391
parser : require . resolve ( '@typescript-eslint/parser' ) ,
3392
3392
} ,
3393
+ {
3394
+ code : `
3395
+ /**
3396
+ * Test
3397
+ */
3398
+ ` ,
3399
+ ignoreReadme : true ,
3400
+ options : [
3401
+ {
3402
+ contexts : [
3403
+ 'any' ,
3404
+ ] ,
3405
+ } ,
3406
+ ] ,
3407
+ } ,
3408
+ {
3409
+ code : `
3410
+ /**
3411
+ * Helper function to warp to a custom stage/level.
3412
+ */
3413
+ export function setCustomStage(): void {}
3414
+ ` ,
3415
+ ignoreReadme : true ,
3416
+ options : [
3417
+ {
3418
+ contexts : [
3419
+ 'any' ,
3420
+ ] ,
3421
+ } ,
3422
+ ] ,
3423
+ parser : require . resolve ( '@typescript-eslint/parser' ) ,
3424
+ } ,
3393
3425
] ,
3394
3426
} ;
You can’t perform that action at this time.
0 commit comments