VS Code tips — The extract function/method refactorings for JavaScript and TypeScript

preview_player
Показать описание
Today's VS Code tip: extract function

Quickly extract a block of code to a new function or method with the extract function refactorings for JavaScript and TypeScript.

Invaluable for cleaning up and organizing your code.

Рекомендации по теме
Комментарии
Автор

I am unable to get this to work in my Typescript projects. Typescript functions are only being extracted as JavaScript functions (without types). Any suggestions?

KevinBateman
Автор

Sometimes this works for me other times it doesnt. Pretty frustrating.I guess only top suggestions show up. I am working with TS

princeofexcess