TypeScript/tests/baselines/reference/extractFunction/extractFunction33.js
Andrew Casey 2ea4cfe23b Insert a line break before a function at EOF if needed
This is a pre-existing issue that became more obvious after refining
trivia handling.
2017-10-12 14:19:36 -07:00

20 lines
375 B
TypeScript

// ==ORIGINAL==
function F() {
/*[#|*/function G() { }/*|]*/
}
// ==SCOPE::Extract to inner function in function 'F'==
function F() {
/*RENAME*/newFunction();
function newFunction() {
function G() { }
}
}
// ==SCOPE::Extract to function in global scope==
function F() {
/*RENAME*/newFunction();
}
function newFunction() {
function G() { }
}