-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Refactoring: Extract to interface #31640
Copy link
Copy link
Closed
Labels
Domain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Metadata
Metadata
Assignees
Labels
Domain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
The "extract to type alias" code fix is great, however, a lot of people (myself included) prefer
interfaces for object types rather than type aliases.Extract to interface should work only on an intersection type with some number of anonymous object types, named object types, and type references.
Examples
Related issues: