{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/immutable-js/issues/979","repository_url":"https://api.github.com/repos/facebook/immutable-js","labels_url":"https://api.github.com/repos/facebook/immutable-js/issues/979/labels{/name}","comments_url":"https://api.github.com/repos/facebook/immutable-js/issues/979/comments","events_url":"https://api.github.com/repos/facebook/immutable-js/issues/979/events","html_url":"https://github.com/facebook/immutable-js/issues/979","id":178218274,"number":979,"title":"Flow: OrderedMap is typed as a regular Map","user":{"login":"rsolomon","id":448432,"avatar_url":"https://avatars.githubusercontent.com/u/448432?v=3","gravatar_id":"","url":"https://api.github.com/users/rsolomon","html_url":"https://github.com/rsolomon","followers_url":"https://api.github.com/users/rsolomon/followers","following_url":"https://api.github.com/users/rsolomon/following{/other_user}","gists_url":"https://api.github.com/users/rsolomon/gists{/gist_id}","starred_url":"https://api.github.com/users/rsolomon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsolomon/subscriptions","organizations_url":"https://api.github.com/users/rsolomon/orgs","repos_url":"https://api.github.com/users/rsolomon/repos","events_url":"https://api.github.com/users/rsolomon/events{/privacy}","received_events_url":"https://api.github.com/users/rsolomon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-21T00:55:28Z","updated_at":"2016-11-18T22:10:58Z","closed_at":null,"body":"### What happened\n\nI'd like to ensure that an parameter passed to a function is of type `OrderedMap` and not just an ordinary `Map`. However, `OrderedMap` simply extends `Map`, and all of its member functions return type `Map`.\n### How to reproduce\n\n```\nfunction mergeOrderedMaps<T, S>(\n  map1: OrderedMap<T, S>,\n  map2: OrderedMap<T, S>,\n): OrderedMap<T, S> {\n  return map1.merge(map2);\n```\n\nResult:\n\n```\nMap\nThis type is incompatible with\nOrderedMap\n```\n"},"comment":{"url":"https://api.github.com/repos/facebook/immutable-js/issues/comments/261655483","html_url":"https://github.com/facebook/immutable-js/issues/979#issuecomment-261655483","issue_url":"https://api.github.com/repos/facebook/immutable-js/issues/979","id":261655483,"user":{"login":"stevenla","id":887038,"avatar_url":"https://avatars.githubusercontent.com/u/887038?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenla","html_url":"https://github.com/stevenla","followers_url":"https://api.github.com/users/stevenla/followers","following_url":"https://api.github.com/users/stevenla/following{/other_user}","gists_url":"https://api.github.com/users/stevenla/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenla/subscriptions","organizations_url":"https://api.github.com/users/stevenla/orgs","repos_url":"https://api.github.com/users/stevenla/repos","events_url":"https://api.github.com/users/stevenla/events{/privacy}","received_events_url":"https://api.github.com/users/stevenla/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T22:10:57Z","updated_at":"2016-11-18T22:10:57Z","body":"My suspicion is this line here:\r\nhttps://github.com/facebook/immutable-js/blob/master/type-definitions/immutable.js.flow#L473\r\n\r\n`myOrderedMap.set()` returns a `Map` instead of an `OrderedMap`"}}
{"actor":{"display_login":"stevenla"}}