This would be similar to the refactor.extract.function refactoring for JS/TS.
This would be similar to the refactor.extract.function refactoring for JS/TS.