Skip to content

Commit

Permalink
feat: support paraterName for class constructor (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy authored and MartinJohns committed Jul 3, 2018
1 parent 81302a8 commit 93276ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function getDecorations(
} else if (ts.isArrowFunction(node) && !node.type && context.configuration.features.functionReturnType) {
const signature = typeChecker.getSignatureFromDeclaration(node);
result.push(getDecoration(sourceFile!, typeChecker, configuration, node, node.equalsGreaterThanToken, signature && signature.getReturnType(), true));
} else if (ts.isCallExpression(node) && node.arguments.length > 0 && context.configuration.features.parameterName) {
} else if ((ts.isCallExpression(node) || ts.isNewExpression(node)) && node.arguments && node.arguments.length > 0 && context.configuration.features.parameterName) {
const resolvedSignature = typeChecker.getResolvedSignature(node);
for (let i = 0; i < node.arguments.length; ++i) {
const argument = node.arguments[i];
Expand Down

0 comments on commit 93276ae

Please sign in to comment.