{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11839","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11839/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11839/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11839/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11839","id":185204998,"number":11839,"title":"Compiler should allow assignment of new property in empty object","user":{"login":"yuit","id":489742,"avatar_url":"https://avatars.githubusercontent.com/u/489742?v=3","gravatar_id":"","url":"https://api.github.com/users/yuit","html_url":"https://github.com/yuit","followers_url":"https://api.github.com/users/yuit/followers","following_url":"https://api.github.com/users/yuit/following{/other_user}","gists_url":"https://api.github.com/users/yuit/gists{/gist_id}","starred_url":"https://api.github.com/users/yuit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuit/subscriptions","organizations_url":"https://api.github.com/users/yuit/orgs","repos_url":"https://api.github.com/users/yuit/repos","events_url":"https://api.github.com/users/yuit/events{/privacy}","received_events_url":"https://api.github.com/users/yuit/received_events","type":"User","site_admin":false},"labels":[{"id":113970366,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/31","html_url":"https://github.com/Microsoft/TypeScript/milestones/TypeScript%202.1.3","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/31/labels","id":2098216,"number":31,"title":"TypeScript 2.1.3","description":"","creator":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":74,"state":"open","created_at":"2016-10-27T18:47:38Z","updated_at":"2016-11-15T23:26:54Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-10-25T19:00:40Z","updated_at":"2016-11-16T01:34:40Z","closed_at":null,"body":"**TypeScript Version:**  built from master\n\n**Code**\n\n``` ts\nvar range;\nrange = {} \nrange.newProp = 10;  // error\n\nvar obj;\nobj = {\n   propx: 10\n}\nobj.propy = 20;  // error\n```\n\n**Expected behavior:**\nNo error here `range.newProp = 10;` or `obj.propy = 20;`\n\n**Actual behavior:** \nError   TS2339  Property 'newProp' does not exist .... or Property 'propy' does not exist ...\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/260826877","html_url":"https://github.com/Microsoft/TypeScript/issues/11839#issuecomment-260826877","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11839","id":260826877,"user":{"login":"aluanhaddad","id":5034656,"avatar_url":"https://avatars.githubusercontent.com/u/5034656?v=3","gravatar_id":"","url":"https://api.github.com/users/aluanhaddad","html_url":"https://github.com/aluanhaddad","followers_url":"https://api.github.com/users/aluanhaddad/followers","following_url":"https://api.github.com/users/aluanhaddad/following{/other_user}","gists_url":"https://api.github.com/users/aluanhaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/aluanhaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluanhaddad/subscriptions","organizations_url":"https://api.github.com/users/aluanhaddad/orgs","repos_url":"https://api.github.com/users/aluanhaddad/repos","events_url":"https://api.github.com/users/aluanhaddad/events{/privacy}","received_events_url":"https://api.github.com/users/aluanhaddad/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T01:34:40Z","updated_at":"2016-11-16T01:34:40Z","body":"@ahejlsberg Its something I'm conflicted about. \r\n\r\nThe main reason why I avoid it is that I find that, while evolving a piece of code, some types are naturally in flux.\r\n\r\nSince `--noImplicitAny` results in an error for unannotated declarations that can not _as that time_ be inferred, the usual thing that people do is add an `any` annotation to \"shut the type checker up\". This would be fine if they went back later and made it more specific or if they removed the type annotation entirely because it became an inference site.\r\n\r\nUnfortunately I find that the code is rarely revisited with this intent and so the `any` remains.\r\n\r\nThat left over `any` then makes the code less safe and, perhaps even more unfortunately, prevents inference from later coming into effect.\r\n\r\nI am open to being persuaded otherwise 😃. "}}
{"actor":{"display_login":"aluanhaddad"}}