Skip to content

Commit 6019502

Browse files
jgozchiawendt
andcommitted
Apply suggestions from code review
Co-Authored-By: golopot <[email protected]>
1 parent 988b3a2 commit 6019502

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jsdocUtils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from 'lodash';
22
import tagNames from './tagNames';
33

44
const getFunctionParameterNames = (functionNode : Object) : Array<string> => {
5-
const functionParameterNameMapper = (param) => {
5+
const getParamName = (param) => {
66
if (_.has(param, 'name')) {
77
return param.name;
88
}
@@ -24,13 +24,13 @@ const getFunctionParameterNames = (functionNode : Object) : Array<string> => {
2424
}
2525

2626
if (param.type === 'TSParameterProperty') {
27-
return functionParameterNameMapper(param.parameter);
27+
return getParamName(param.parameter);
2828
}
2929

3030
throw new Error('Unsupported function signature format.');
3131
};
3232

33-
return _.map(functionNode.params, functionParameterNameMapper);
33+
return functionNode.params.map(getParamName);
3434
};
3535

3636
/**

0 commit comments

Comments
 (0)