codedownio / aeson-typescript

Generate TypeScript definition files from your ADTs
BSD 3-Clause "New" or "Revised" License
60 stars 27 forks source link

Implement support for unwrapUnaryRecords option #12

Closed cfraz89 closed 3 years ago

cfraz89 commented 5 years ago

Respect the unwrapUnaryRecords option. When True, this exports unary records / newtypes as a type alias to the type of the single field within.

thomasjm commented 4 years ago

Sorry for the long delay @cfraz89 -- I'll try to get this merged soon!

drostron commented 3 years ago

We recently found ourselves wanting this on a project at work. Is there still interest in this PR if we were to resolve conflicts and get CI passing?

thomasjm commented 3 years ago

Definitely! Sorry again for not getting this merged sooner. I actually had a WIP branch open where I added more tests to exercise the new functionality. There are some test failures at the moment that I haven't looked at yet.

I just pushed the branch here: https://github.com/codedownio/aeson-typescript/tree/francesco-rebased

If someone could get the tests passing I'd be happy to merge it.

thomasjm commented 3 years ago

This is implemented now in 7e4c7b1d108280147a6eb5fdfae94e18fcdcb60b