Hacker News new | ask | show | jobs
by quaunaut 823 days ago
Curious what your issue was with duck-typing. Were you effectively looking to create ADTs that are required to go through a specific step-by-step process, not simply 'look like' the thing that was expected?

If so, you might be interested in [newtype-ts].

[newtype-ts]: https://github.com/gcanti/newtype-ts

1 comments

Thanks for the link. That was exactly my use case and I should remember your helpful suggestion next time I use TS.