Everlaw / nbts

NetBeans TypeScript editor plugin
283 stars 46 forks source link

Please add hints with fixes like in java #85

Closed Chris2011 closed 7 years ago

Chris2011 commented 7 years ago

I know there you can add a lot of hints with fixes with alt + enter on errors/warnings but for me atm I realized it for methos who has a return value like int or Object e.g. but I gave nothing back. I got this error:

return-value

what is correct, it is a correct error but when I hit alt + enter I got only the error message but no fixes like in java as you can see it here:

return-value-java

So it would be really great to have such hints + fixes like in java.

Regards

Chris

Chris2011 commented 7 years ago

And for changing to void too.

jeffrey-easyesi commented 7 years ago

Code fixes are provided by the TypeScript language service at https://github.com/Microsoft/TypeScript/

As of 2.1.4 the only fixes available are inserting a missing super() call in a subclass's constructor, and moving a super() call above a this access. I did my part so that nbts does support these:

fix

If there's a particular code fix you want, go to https://github.com/Microsoft/TypeScript/issues and file a bug there (if nobody else has already).