Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
Kejistan
· 4y ago · 0 comments
Spreads are ordered, and try to match the semantics of object spreads at runtime. Intersection types don't do that, they express that the type is both things at the same time. It is most obvious when dealing with types that have overlapping properties: [typescript with intersections](
https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDeA...
) [flow with spreads](
https://flow.org/try/#0C4TwDgpgBAglC8UDeAfAUFTUBmB7XAXFAHYCu...
).
Comments
No comments yet.
Better HN