benjamn / recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator
MIT License
4.91k stars 347 forks source link

Update printer.ts to support `kind = 'get'/'set'` on `TSMethodSignature` #1383

Closed dandean closed 2 months ago

dandean commented 7 months ago

TSMethodSignature has a kind property which can be set to method (the default), get, and set. When get and set, the method is a getter or a setter, and as such, should be prefixed with either get or set.

coderaiser commented 2 months ago

Could you please add test for this? Or provide code example

coderaiser commented 2 months ago

Added tests https://github.com/benjamn/recast/pull/1401 and landed in @putout/recast@1.16.0

dandean commented 2 months ago

@coderaiser Apologies for the delayed response, and thank you for adding the tests! Would you like me to take additional action, or is it handled as needed in #1401?

coderaiser commented 2 months ago

Some checks are failing in my PR, so if you fix this in your PR, I think it can make things go a bit faster :)...

eventualbuddha commented 2 months ago

Published in v0.23.8.