{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/draft-js/issues/404","repository_url":"https://api.github.com/repos/facebook/draft-js","labels_url":"https://api.github.com/repos/facebook/draft-js/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/facebook/draft-js/issues/404/comments","events_url":"https://api.github.com/repos/facebook/draft-js/issues/404/events","html_url":"https://github.com/facebook/draft-js/issues/404","id":155945621,"number":404,"title":"Flow is broken with immutable versions > 3.7.4","user":{"login":"mitermayer","id":1042131,"avatar_url":"https://avatars.githubusercontent.com/u/1042131?v=3","gravatar_id":"","url":"https://api.github.com/users/mitermayer","html_url":"https://github.com/mitermayer","followers_url":"https://api.github.com/users/mitermayer/followers","following_url":"https://api.github.com/users/mitermayer/following{/other_user}","gists_url":"https://api.github.com/users/mitermayer/gists{/gist_id}","starred_url":"https://api.github.com/users/mitermayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitermayer/subscriptions","organizations_url":"https://api.github.com/users/mitermayer/orgs","repos_url":"https://api.github.com/users/mitermayer/repos","events_url":"https://api.github.com/users/mitermayer/events{/privacy}","received_events_url":"https://api.github.com/users/mitermayer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-20T11:47:34Z","updated_at":"2016-06-03T20:45:23Z","closed_at":null,"body":"We currently have on npm\r\n\r\n` \"immutable\": \"^3.7.4\"`\r\n\r\nversion 3.7.5 of immutable causes the following error:\r\n\r\n```\r\nsrc/model/immutable/BlockMapBuilder.js:27\r\n27:       blocks.map(\r\n          ^ call of method `map`\r\n26:     return OrderedMap(\r\n               ^ function call. Function cannot be called on any member of intersection type\r\n26:     return OrderedMap(\r\n               ^ intersection\r\n Member 1:\r\n 467:   static <K, V>(): Map<K, V>;\r\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See: node_modules/immutable/dist/immutable.js.flow:467\r\n Error:\r\n  26:     return OrderedMap(\r\n                 ^ Map. This type is incompatible with\r\n  25:   :disappointed: BlockMap | OrderedMap {\r\n           ^^^^^^^^^^^^^^^^^^^^^ union: BlockMap | OrderedMap\r\n   Member 1:\r\n    25:   :disappointed: BlockMap | OrderedMap {\r\n             ^^^^^^^^ BlockMap\r\n   Error:\r\n    26:     return OrderedMap(\r\n                   ^ Map. This type is incompatible with\r\n    25:   ): BlockMap | OrderedMap {\r\n             ^^^^^^^^ OrderedMap\r\n   Member 2:\r\n    25:   :disappointed: BlockMap | OrderedMap {\r\n                        ^^^^^^^^^^ OrderedMap\r\n   Error:\r\n    26:     return OrderedMap(\r\n                   ^ Map. This type is incompatible with\r\n    25:   ): BlockMap | OrderedMap {\r\n                        ^^^^^^^^^^ OrderedMap\r\n Member 2:\r\n 468:   static <V>(obj?: {[key: string]: V}): Map<string, V>;\r\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See: node_modules/immutable/dist/immutable.js.flow:468\r\n Error:\r\n  27:       blocks.map(\r\n            ^ array type. This type is incompatible with\r\n 468:   static <V>(obj?: {[key: string]: V}): Map<string, V>;\r\n                         ^^^^^^^^^^^^^^^^^^ object type. See: node_modules/immutable/dist/immutable.js.flow:468\r\n Member 3:\r\n 469:   static <K, V>(iterable?: ESIterable<[K,V]>): Map<K, V>;\r\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See: node_modules/immutable/dist/immutable.js.flow:469\r\n Error:\r\n  26:     return OrderedMap(\r\n                 ^ Map. This type is incompatible with\r\n  25:   :disappointed: BlockMap | OrderedMap {\r\n           ^^^^^^^^^^^^^^^^^^^^^ union: BlockMap | OrderedMap\r\n   Member 1:\r\n    25:   :disappointed: BlockMap | OrderedMap {\r\n             ^^^^^^^^ BlockMap\r\n   Error:\r\n    26:     return OrderedMap(\r\n                   ^ Map. This type is incompatible with\r\n    25:   ): BlockMap | OrderedMap {\r\n             ^^^^^^^^ OrderedMap\r\n   Member 2:\r\n    25:   :disappointed: BlockMap | OrderedMap {\r\n                        ^^^^^^^^^^ OrderedMap\r\n   Error:\r\n    26:     return OrderedMap(\r\n                   ^ Map. This type is incompatible with\r\n    25:   ): BlockMap | OrderedMap {\r\n                        ^^^^^^^^^^ OrderedMap\r\n\r\nsrc/model/immutable/DraftInlineStyle.js:15\r\n15: import type Immutable from 'immutable';\r\n                ^^^^^^^^^ Default import from `immutable`. This module has no default export.\r\n\r\nsrc/model/immutable/EditorBidiService.js:48\r\n48:     return bidiMap;\r\n               ^^^^^^^ Map. This type is incompatible with\r\n31:   :disappointed: OrderedMap {\r\n         ^^^^^^^^^^ OrderedMap\r\n\r\nsrc/model/immutable/EditorState.js:518\r\n518:   return contentState\r\n             ^ Map. This type is incompatible with\r\n517: :disappointed: OrderedMap<string, List> {\r\n       ^^^^^^^^^^^^^^^^^^^^^^^^ OrderedMap\r\n\r\nsrc/model/immutable/EditorState.js:558\r\n558:   return previousTreeMap.merge(\r\n             ^ Map. This type is incompatible with\r\n557: ): OrderedMap<string, List> {\r\n       ^^^^^^^^^^^^^^^^^^^^^^^^ OrderedMap\r\n\r\nsrc/model/transaction/getContentStateFragment.js:79\r\n79:   return slice.toOrderedMap();\r\n             ^^^^^^^^^^^^^^^^^^^^ call of method `toOrderedMap`\r\n79:   return slice.toOrderedMap();\r\n             ^^^^^^^^^^^^^^^^^^^^ Map. This type is incompatible with\r\n27: :disappointed: BlockMap {\r\n       ^^^^^^^^ OrderedMap\r\n```\r\n\r\nthis is related to:\r\nhttps://github.com/facebook/immutable-js/pull/761 (Fix toOrderedMap and toOrderedSet method definitions #761)\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/draft-js/issues/comments/223690055","html_url":"https://github.com/facebook/draft-js/issues/404#issuecomment-223690055","issue_url":"https://api.github.com/repos/facebook/draft-js/issues/404","id":223690055,"user":{"login":"hellendag","id":2823852,"avatar_url":"https://avatars.githubusercontent.com/u/2823852?v=3","gravatar_id":"","url":"https://api.github.com/users/hellendag","html_url":"https://github.com/hellendag","followers_url":"https://api.github.com/users/hellendag/followers","following_url":"https://api.github.com/users/hellendag/following{/other_user}","gists_url":"https://api.github.com/users/hellendag/gists{/gist_id}","starred_url":"https://api.github.com/users/hellendag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellendag/subscriptions","organizations_url":"https://api.github.com/users/hellendag/orgs","repos_url":"https://api.github.com/users/hellendag/repos","events_url":"https://api.github.com/users/hellendag/events{/privacy}","received_events_url":"https://api.github.com/users/hellendag/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T20:45:23Z","updated_at":"2016-06-03T20:45:23Z","body":"I ran into the same thing before going on leave. Thanks for the PR, @johanneslumpe. :)"}}
{"actor":{"display_login":"hellendag"}}