Hacker News new | ask | show | jobs
by Kejistan 1356 days ago
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...).