Fix bug: FunctionDeclaration may have missing name (#20618)

This commit is contained in:
Andy
2017-12-11 09:45:20 -08:00
committed by GitHub
parent f2f17454af
commit b629ff4204
2 changed files with 23 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
/// <reference path='fourslash.ts' />
////export default function() {
//// /*start*/0/*end*/
////}
goTo.select('start', 'end')
edit.applyRefactor({
refactorName: "Extract Symbol",
actionName: "function_scope_0",
actionDescription: "Extract to inner function in anonymous function",
newContent:
`export default function() {
/*RENAME*/newFunction();
function newFunction() {
0;
}
}`
});