Advantages of Using Type-Fest's Opaque Type vs. Branded Interface in TypeScript
Hello. This is kind of a niche question, so it is very hard to google it, hope you don't mind me asking it here.
What is the advantage of using the helper Opaque type from type-fest with a branded interface vs an intersection with the same branded interface directly?
I mean, instead of this:
Do just this:
Where x brand looks like this:
I assume there is some benefit, but I couldn't see it
What is the advantage of using the helper Opaque type from type-fest with a branded interface vs an intersection with the same branded interface directly?
I mean, instead of this:
Do just this:
Where x brand looks like this:
I assume there is some benefit, but I couldn't see it
