gcanti / newtype-ts

Implementation of newtypes in TypeScript
https://gcanti.github.io/newtype-ts/
MIT License
578 stars 14 forks source link

Is newtype-ts only for primitive types? #22

Closed steida closed 4 years ago

steida commented 4 years ago

I am not sure, it seems that for non-primitive types https://dev.to/gcanti/functional-design-smart-constructors-14nb is enough.

steida commented 4 years ago

OK, I got it. It's just interface, so it can be used for anything.