{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/495","labels_url":"https://api.github.com/repos/facebook/flow/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/495/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/495/events","html_url":"https://github.com/facebook/flow/issues/495","id":85258069,"number":495,"title":"Allow declared class constructors to specify a non-void return type","user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars.githubusercontent.com/u/254842?v=3","gravatar_id":"","url":"https://api.github.com/users/samwgoldman","html_url":"https://github.com/samwgoldman","followers_url":"https://api.github.com/users/samwgoldman/followers","following_url":"https://api.github.com/users/samwgoldman/following{/other_user}","gists_url":"https://api.github.com/users/samwgoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/samwgoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samwgoldman/subscriptions","organizations_url":"https://api.github.com/users/samwgoldman/orgs","repos_url":"https://api.github.com/users/samwgoldman/repos","events_url":"https://api.github.com/users/samwgoldman/events{/privacy}","received_events_url":"https://api.github.com/users/samwgoldman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/flow/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/facebook/flow/labels/easyfix","name":"easyfix","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"avikchaudhuri","id":5328177,"avatar_url":"https://avatars.githubusercontent.com/u/5328177?v=3","gravatar_id":"","url":"https://api.github.com/users/avikchaudhuri","html_url":"https://github.com/avikchaudhuri","followers_url":"https://api.github.com/users/avikchaudhuri/followers","following_url":"https://api.github.com/users/avikchaudhuri/following{/other_user}","gists_url":"https://api.github.com/users/avikchaudhuri/gists{/gist_id}","starred_url":"https://api.github.com/users/avikchaudhuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avikchaudhuri/subscriptions","organizations_url":"https://api.github.com/users/avikchaudhuri/orgs","repos_url":"https://api.github.com/users/avikchaudhuri/repos","events_url":"https://api.github.com/users/avikchaudhuri/events{/privacy}","received_events_url":"https://api.github.com/users/avikchaudhuri/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-06-04T20:14:32Z","updated_at":"2015-06-15T19:19:11Z","closed_at":null,"body":"b99042b05a38cc72e7d147f33b38470d1bad715b made it possible for the inferred return type of a constructor to be non-void, but it seems that declared classes still can't specify a return type.\r\n\r\n```\r\ndeclare class D {\r\n  constructor(): { x: number };\r\n}\r\n\r\nvar d = new D();\r\nd.x = \"\";\r\n```\r\n\r\n```\r\nconstructor call\r\nError:\r\nobject type\r\nhis type is incompatible with undefined\r\n\r\nassignment of property x\r\nProperty not found in\r\nD\r\n```\r\n\r\nThis is useful for the \"NamedConstructor\" concept in IDL files. See #478."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/112179024","html_url":"https://github.com/facebook/flow/issues/495#issuecomment-112179024","issue_url":"https://api.github.com/repos/facebook/flow/issues/495","id":112179024,"user":{"login":"gabelevi","id":1887264,"avatar_url":"https://avatars.githubusercontent.com/u/1887264?v=3","gravatar_id":"","url":"https://api.github.com/users/gabelevi","html_url":"https://github.com/gabelevi","followers_url":"https://api.github.com/users/gabelevi/followers","following_url":"https://api.github.com/users/gabelevi/following{/other_user}","gists_url":"https://api.github.com/users/gabelevi/gists{/gist_id}","starred_url":"https://api.github.com/users/gabelevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabelevi/subscriptions","organizations_url":"https://api.github.com/users/gabelevi/orgs","repos_url":"https://api.github.com/users/gabelevi/repos","events_url":"https://api.github.com/users/gabelevi/events{/privacy}","received_events_url":"https://api.github.com/users/gabelevi/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T19:19:11Z","updated_at":"2015-06-15T19:19:11Z","body":"I suppose I don't know for a fact that this is an easy fix. I'm just guessing :)."}}