this
is not preserved when extracted to function in module scope
#39931
Labels
Milestone
this
is not preserved when extracted to function in module scope
#39931
TypeScript Version: 3.9.6
Search Terms: extract to function, this
Code
Select these two
console.log
and extract them to function in module scope.Expected behavior:
this
should be passed tonewFunction
Actual behavior:
this
innewFunction
isundefined
now.Playground Link:
Seems Refactoring is not supported on TypeScript Playground.
Related Issues:
The text was updated successfully, but these errors were encountered: