mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Add property comments as well
This commit is contained in:
parent
04d750f9f8
commit
b52747e12c
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: test123.js
|
||||
//// function fn() {
|
||||
//// /** neat! */
|
||||
//// this.x = 100;
|
||||
//// }
|
||||
////
|
||||
@ -16,6 +17,7 @@
|
||||
verify.fileAfterApplyingRefactorAtMarker('1',
|
||||
`class fn {
|
||||
constructor() {
|
||||
/** neat! */
|
||||
this.x = 100;
|
||||
}
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user