{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/3418","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/3418/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/3418/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/3418/events","html_url":"https://github.com/facebook/flow/issues/3418","id":209701963,"number":3418,"title":"Callable signature not found in interface","user":{"login":"carney520","id":6149975,"avatar_url":"https://avatars.githubusercontent.com/u/6149975?v=3","gravatar_id":"","url":"https://api.github.com/users/carney520","html_url":"https://github.com/carney520","followers_url":"https://api.github.com/users/carney520/followers","following_url":"https://api.github.com/users/carney520/following{/other_user}","gists_url":"https://api.github.com/users/carney520/gists{/gist_id}","starred_url":"https://api.github.com/users/carney520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carney520/subscriptions","organizations_url":"https://api.github.com/users/carney520/orgs","repos_url":"https://api.github.com/users/carney520/repos","events_url":"https://api.github.com/users/carney520/events{/privacy}","received_events_url":"https://api.github.com/users/carney520/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-23T09:04:38Z","updated_at":"2017-02-25T06:25:42Z","closed_at":null,"body":"```javascript\r\nclass A {}\r\nclass B extends A {\r\n  data: {data: Baz}\r\n}\r\n\r\ntype Baz = A | () => A\r\ninterface Foo {data: Baz }\r\ntype Bar = {data: Baz }\r\n\r\nlet b = new B()\r\nlet foo1: Foo = {data: new B}\r\nlet foo2: Foo = {data: function () {return new B}}  // ❌ error here： Callable signature not found\r\n\r\nlet bar1: Bar = {data: function () {return new B}}\r\nlet bar2: Bar = {data: new B}\r\n\r\nb.data = {data: function () {return new B}}\r\nb.data = {data: new A}\r\n```\r\n\r\n[see also](https://flowtype.org/try/#0MYGwhgzhAECC0G8C+AoUkYCFoFMAeALjgHYAmM8CK00pYBYAXInQ85mAF6qooECeABxzQOnaAF440AD7QAFAEpJAPjgoAlsSIAnAGZhgIgGIB7Uy3pNRXaKgHCbOyZbY3xvEDgLQARi+IcAHdRJRQvHz1zAEZmMwspBFZrQJDMVAjoKNMAJjjzFySrZj0AV2JgAg1TYgVlBB1vUp1a1NEkJBoAei7oQBlyXB0dU2cACxxGwCx-6ABhMBBwXy9oCA0Ac2J6ZpFiU0jTctIUcO8-MB1Yp0LkkvLK6tqlREaCZtbg9ozT33O8q8SbtA2uljr4AHTJa7FLJ3Ko1OrPJotIEfdKocGQgHQtqwJBAA) \r\nWhat difference between Object Type and Interface?"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/282464216","html_url":"https://github.com/facebook/flow/issues/3418#issuecomment-282464216","issue_url":"https://api.github.com/repos/facebook/flow/issues/3418","id":282464216,"user":{"login":"carney520","id":6149975,"avatar_url":"https://avatars.githubusercontent.com/u/6149975?v=3","gravatar_id":"","url":"https://api.github.com/users/carney520","html_url":"https://github.com/carney520","followers_url":"https://api.github.com/users/carney520/followers","following_url":"https://api.github.com/users/carney520/following{/other_user}","gists_url":"https://api.github.com/users/carney520/gists{/gist_id}","starred_url":"https://api.github.com/users/carney520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carney520/subscriptions","organizations_url":"https://api.github.com/users/carney520/orgs","repos_url":"https://api.github.com/users/carney520/repos","events_url":"https://api.github.com/users/carney520/events{/privacy}","received_events_url":"https://api.github.com/users/carney520/received_events","type":"User","site_admin":false},"created_at":"2017-02-25T06:25:42Z","updated_at":"2017-02-25T06:25:42Z","body":"You have ignored the operator order.\r\n`type Baz = () => A | A` is a function return `(A | A)`,  in other word, `type Baz = () => A | A` is equal to  `type Baz = () => (A | A)`.\r\n\r\nIn above case, the error output won't be caused by the Union order . This problem is what difference between Interface and Object type. I think this is a bug.\r\n"}}
{"actor":{"display_login":"carney520"}}