DEV Community

Discussion on: Clean Architecture on Frontend

Collapse
 
ashoutinthevoid profile image
Full Name

If you're already in the fp-ts ecosystem, you might consider using newtype-ts.

Even if you stick with the recommendation in the article, using the unique symbol approach (as in the newtype-ts examples) seems to completely avoid the string constant collision worry that ts-brand mentions repeatedly in its readme.

Collapse
 
bespoyasov profile image
Alex Bespoyasov

Oh, seems interesting, thanks!
I’ll definitely check it out :–)

Collapse
 
uriannrima profile image
Luciano Lima

Definitely! I really didn't knew that you could use symbols to brand types, which is really great! I'll try to take a look at the newtype-ts. Thanks @ashoutinthevoid !