{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/9","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/9/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/9/events","html_url":"https://github.com/Microsoft/TypeScript/issues/9","id":37903383,"number":9,"title":"Suggestion: Extension methods","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"labels":[{"id":117630923,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Out%20of%20Scope","name":"Out of Scope","color":"556677","default":false},{"id":113971155,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":124,"created_at":"2014-07-15T16:52:29Z","updated_at":"2016-11-30T20:15:17Z","closed_at":"2016-07-31T22:14:05Z","body":"Allow a declarative way of adding members to an existing type's prototype\n\nExample:\n\n``` TypeScript\n\nclass Shape {\n // ...\n}\n\n/* ...elsewhere...*/\nextension class Shape { // Syntax??\n    getArea() { return /* ... */; }\n}\n\nvar x = new Shape();\nconsole.log(x.getArea()); // OK\n```\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/263982599","html_url":"https://github.com/Microsoft/TypeScript/issues/9#issuecomment-263982599","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/9","id":263982599,"user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T20:15:17Z","updated_at":"2016-11-30T20:15:17Z","body":"7. Basic JS premises like `bar[\"foo\"] !== undefined` implying `\"foo\" in bar` are now broken, unless we would want to somehow rewrite the `in` operator in certain cases (how??). It's not clear how you could do this in a way that doesn't fundamentally change the runtime behavior of JS in many cases.\r\n8. Basic JS premises like `const x = \"foo\"; bar[x]();` being identical to `bar.foo();` are now broken, unless we want to start doing aggressive constant folding, but even that wouldn't be sufficient. It's hard to imagine keeping a straight face on the \"all JS is TS\" promise here."}}
{"actor":{"display_login":"RyanCavanaugh"}}