Extract Type Refactoring

Extract a type into its own definition and improve the reusability in your code

If you have an anonymous type defined, you can extract it into a standalone type and reuse it across your code.

How to use: Invoke Refactor this with ^T (macOS) / Ctrl+Alt+Shift+T (Windows/Linux), on the anonymous type, then select the Extract type from the list of available refactorings.

Give it a name and start reusing the newly created type in your code.

Related Resources

Create a function in another package
Type a non-existing function name and generate its implementation in a package of your choice
Introduce parameters from unresolved references in your code
Change a function or method signature by introducing parameters directly from unresolved references
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions