-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
Code
function Wagon(numberOxen) {
this.numberOxen = numberOxen
}
/**
* Continue traveling to Oregon
* @param {number} speed How fast to travel. Should be > 0 and < c
*/
Wagon.prototype.go = function(speed) { }
new Wagon(1)
Trigger the convert to es6 class
refactoring on Wagon
Expected behavior:
JSDoc on go
is preserved in the new class
class Wagon {
constructor(numberOxen) {
this.numberOxen = numberOxen;
}
/**
* Continue traveling to Oregon
* @param {number} speed How fast to travel. Should be > 0 and < c
*/
go(speed) { }
}
new Wagon(1)
Actual behavior:
JSdoc is lost:
class Wagon {
constructor(numberOxen) {
this.numberOxen = numberOxen;
}
go(speed) { }
}
new Wagon(1)
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolFixedA PR has been merged for this issueA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue