filmov
tv
VS Code tips — The Extract type refactoring for TypeScript
Показать описание
Today's VS Code tip: extract type refactorings
Quickly extract a selected TypeScript type to a new interface or type alias.
This is helpful when cleaning up code or if you want to reuse a type somewhere else in your project
Here's the "extract" keyboard shortcut I use that support both 'extract type' and 'extract constant':
{
"key": "ctrl+shift+e",
"args": {
"preferred": true,
"apply": "first"
}
}
Quickly extract a selected TypeScript type to a new interface or type alias.
This is helpful when cleaning up code or if you want to reuse a type somewhere else in your project
Here's the "extract" keyboard shortcut I use that support both 'extract type' and 'extract constant':
{
"key": "ctrl+shift+e",
"args": {
"preferred": true,
"apply": "first"
}
}