-
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 symbolFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Found from #37814.
function foo() {
[|var x: number
x = 10;
return x;|]
}
Extract [|
this range |]
to a function in the global scope.
Expected:
function foo() {
return yadda();
}
function yadda() {
var x: number;
x = 10;
return x;
}
or
function foo() {
return yadda();
}
function yadda() {
var x: number
x = 10;
return x;
}
Actual:
function foo() {
return yadda();
}
function yadda() {
var x: number
;
x = 10;
return x;
}
andrewbranch
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 symbolFix AvailableA PR has been opened for this issueA PR has been opened for this issue