-
Notifications
You must be signed in to change notification settings - Fork 202
Quickfix for interface method stubs #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Would absolutely accept a PR. Thank you. |
@nycdotnet , was there any traction on this feature add request? |
I haven't seen any, but would still love a PR for it. |
I started looking at how this could be done, when I found this: https://github.com/TypeStrong/atom-typescript/blob/master/lib/main/lang/fixmyts/quickFixes/implementInterface.ts (which is I guess what this issue is about), but unfortunately I didn't go any further and forgot about it 😢 |
Is there any plan to be implemented? As long as I see the code of quick fix, the quick fix code wouldn't do anything. The quickfix just shows |
I've implemented this today locally, using the TypeScript Language Service getCodeFixesAtPosition API, which seems to do exactly what this Quickfix is supposed to do. Any thoughts as to why the LanguageService API wasn't used before or why it doesn't seem to be used for any of the other Quickfixes (afaics from a quick look through the code) The only problem I have is that the formatting is off. Anyone knows how to fix the formatting? I would've thought the LangaugeService would return me the code fixes properly formatted, but that doesn't seem to be the case. If I can get this formatting resolved, I can make a Pull Request out of this |
Quickfixes were only recently added to the Typescript API while One thing it is currently lacking is Codefix support and I would be extremely happy if some enterprising soul would add that. |
This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days |
I find this a very useful feature, mostly for compiled languages like java or scala.
Let's say you have an interface:
Now when you start writing an implementation, and you have this:
It would be really helpful to have a quickfix, that is able to generate for you something like this:
Because otherwise you have to go to the interface, copy-paste the methods, ... I don't have to explain the process.
Do you consider implementing this? If not, would you consider accepting a PR if I were to implement it?
The text was updated successfully, but these errors were encountered: