2 ms·
> Structural typing makes it too easy to accidentally pass something that looks like a duck but is actually a goose. This may be true, but in reality after 7 y
by hn_throwaway_99 2y ago
> Structural typing makes it too easy to accidentally pass something that looks like a duck but is actually a goose.
This may be true, but in reality after 7 years of using TypeScript I don't think I've ever encountered this as a bug for an object (Record) type.
Even for branded types I find the value much more in self-documenting code than actual type safety, and I only have used branded types for primitives.