GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Suggestion: extract to function expression · Issue #31860 · microsoft/TypeScript Open Labels Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript DescriptionSearch Termsfunction expression declaration extract method refactoring code fixes Suggestion"Extract to function" is very useful, but it only supports generating function declarations. Some people (such as me) prefer to use function expressions instead of declarations. For example: const fn = () => { const foo = 1; const bar = foo + 2 } If I select line 3 and extract to function, I get const fn = () => { const foo = 1; const bar = newFunction(foo) } function newFunction(foo: number) { return foo + 2; } I want: const newFunction = (foo: number) => foo + 2; const fn = () => { const foo = 1; const bar = newFunction(foo) } Some ideas:
Use CasesExamplesChecklistMy suggestion meets these guidelines:
Activity
MetadataMetadataAssigneesLabelsAwaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |