{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/2820","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/2820/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/2820/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/2820/events","html_url":"https://github.com/facebook/flow/issues/2820","id":189634957,"number":2820,"title":"flow errors when using `this` in class method argument defaults","user":{"login":"nrser","id":207603,"avatar_url":"https://avatars.githubusercontent.com/u/207603?v=3","gravatar_id":"","url":"https://api.github.com/users/nrser","html_url":"https://github.com/nrser","followers_url":"https://api.github.com/users/nrser/followers","following_url":"https://api.github.com/users/nrser/following{/other_user}","gists_url":"https://api.github.com/users/nrser/gists{/gist_id}","starred_url":"https://api.github.com/users/nrser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrser/subscriptions","organizations_url":"https://api.github.com/users/nrser/orgs","repos_url":"https://api.github.com/users/nrser/repos","events_url":"https://api.github.com/users/nrser/events{/privacy}","received_events_url":"https://api.github.com/users/nrser/received_events","type":"User","site_admin":false},"labels":[{"id":142478705,"url":"https://api.github.com/repos/facebook/flow/labels/Closed:%20duplicate","name":"Closed: duplicate","color":"ffffff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-16T08:56:46Z","updated_at":"2016-11-16T11:19:20Z","closed_at":"2016-11-16T10:23:15Z","body":"this sort of thing works in babel-land:\r\n\r\n```js\r\nclass A {\r\n  x: string;\r\n  \r\n  constructor(x: string) {\r\n    this.x = x;\r\n  }\r\n  \r\n  f(x = this.x) {\r\n    // ...\r\n  }\r\n}\r\n```\r\n\r\nbut flow (using `v0.35.0`) doesn't like it (seems to see `this` as the global object). maybe this is an anti-pattern of sorts, but it's quite convenient; would be nice if it type-checked."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/260921027","html_url":"https://github.com/facebook/flow/issues/2820#issuecomment-260921027","issue_url":"https://api.github.com/repos/facebook/flow/issues/2820","id":260921027,"user":{"login":"nrser","id":207603,"avatar_url":"https://avatars.githubusercontent.com/u/207603?v=3","gravatar_id":"","url":"https://api.github.com/users/nrser","html_url":"https://github.com/nrser","followers_url":"https://api.github.com/users/nrser/followers","following_url":"https://api.github.com/users/nrser/following{/other_user}","gists_url":"https://api.github.com/users/nrser/gists{/gist_id}","starred_url":"https://api.github.com/users/nrser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrser/subscriptions","organizations_url":"https://api.github.com/users/nrser/orgs","repos_url":"https://api.github.com/users/nrser/repos","events_url":"https://api.github.com/users/nrser/events{/privacy}","received_events_url":"https://api.github.com/users/nrser/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T11:19:20Z","updated_at":"2016-11-16T11:19:20Z","body":"thanks. did some searches but didn't see that one."}}
{"actor":{"display_login":"nrser"}}