<Googles “TypeScript interface vs type”, gets back several poorly-written articles>
This is not the future of documentation.
Conversation
This Tweet was deleted by the Tweet author. Learn more
stackoverflow.com/questions/3723
This seems like the most concrete / concise answer... but it lacks examples towards the end.
1
Note that in Flow you just use `object1 & object2` and objects were open by default so that you could get the same structural polymorphism that you get with TS's interfaces. But it seems like they have now been added: flow.org/en/docs/types/
1
Not sure the rationale - perhaps for familiarity for C#/Java developers? I find a structural type system with intersections more elegant, but I guess I can see why MS started with interfaces and added intersections etc later.
Perhaps Flow added interfaces to attempt to 'keep up' with TypeScript?
1
Or maybe they were always there and I just didn't know it! That is definitely a possibility. 😅

