Add property comments as well

This commit is contained in:
Ryan Cavanaugh
2017-06-26 10:54:18 -07:00
parent 04d750f9f8
commit b52747e12c
2 changed files with 5 additions and 1 deletions

View File

@@ -197,8 +197,10 @@ namespace ts.refactor {
if (isSourceFileJavaScript(sourceFile)) {
return;
}
return createProperty(/*decorators*/ undefined, modifiers, memberDeclaration.name, /*questionToken*/ undefined,
const prop = createProperty(/*decorators*/ undefined, modifiers, memberDeclaration.name, /*questionToken*/ undefined,
/*type*/ undefined, assignmentBinaryExpression.right);
copyComments(assignmentBinaryExpression.parent, prop);
return prop;
}
}
}