{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/15453","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/15453/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/15453/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/15453/events","html_url":"https://github.com/Microsoft/TypeScript/issues/15453","id":225196160,"number":15453,"title":"Class declaration not checked for compatibility with Object.prototype","user":{"login":"samwgoldman","id":254842,"avatar_url":"https://avatars1.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":[{"id":371615203,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Working%20as%20Intended","name":"Working as Intended","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-04-28T21:21:38Z","updated_at":"2017-05-19T16:47:35Z","closed_at":"2017-05-19T16:47:35Z","body":"<!-- BUGS: Please use this template. -->\r\n<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n**TypeScript Version:**  Whatever is running on the TypeScript playground\r\n\r\n**Code**\r\n\r\n```ts\r\nclass C {\r\n  toString(): number {\r\n    return 0;\r\n  }\r\n}\r\n\r\nfunction f(o: {}): string {\r\n  return o.toString();\r\n}\r\n\r\nf(new C);\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nThe declaration of C should be an error, because `toString` is not compatible with the implementation in Object.prototype.\r\n\r\n**Actual behavior:**\r\n\r\nThere is no error. Calling `f` with an instance of `C` results in a number at runtime where we expect a string."}}
{"actor":{"display_login":"mhegazy"}}