File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import _ from 'lodash';
2
2
import tagNames from './tagNames' ;
3
3
4
4
const getFunctionParameterNames = ( functionNode : Object ) : Array < string > => {
5
- const functionParameterNameMapper = ( param ) => {
5
+ const getParamName = ( param ) => {
6
6
if ( _ . has ( param , 'name' ) ) {
7
7
return param . name ;
8
8
}
@@ -24,13 +24,13 @@ const getFunctionParameterNames = (functionNode : Object) : Array<string> => {
24
24
}
25
25
26
26
if ( param . type === 'TSParameterProperty' ) {
27
- return functionParameterNameMapper ( param . parameter ) ;
27
+ return getParamName ( param . parameter ) ;
28
28
}
29
29
30
30
throw new Error ( 'Unsupported function signature format.' ) ;
31
31
} ;
32
32
33
- return _ . map ( functionNode . params , functionParameterNameMapper ) ;
33
+ return functionNode . params . map ( getParamName ) ;
34
34
} ;
35
35
36
36
/**
You can’t perform that action at this time.
0 commit comments