Why are Maps allowed where an OrderedMap is expected? (TypeScript API Design Question)
I think I understand technically why in effect Map<K,V> extends OrderedMap<K,V>
holds, despite it never being written in the source code (only the other way round):
TypeScript’s structural typing dictates that, as objects of types Map and OrderedMap have the exact same outwardly visible properties/methods (fields), and these fields have the same (generic) types, Map and OrderedMap are actually considered the same type.