{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/285","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/285/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/285/events","html_url":"https://github.com/Microsoft/TypeScript/issues/285","id":38943189,"number":285,"title":"Allow type system to represent `this` in function inputs/outputs","user":{"login":"fsoikin","id":4219105,"avatar_url":"https://avatars.githubusercontent.com/u/4219105?v=3","gravatar_id":"","url":"https://api.github.com/users/fsoikin","html_url":"https://github.com/fsoikin","followers_url":"https://api.github.com/users/fsoikin/followers","following_url":"https://api.github.com/users/fsoikin/following{/other_user}","gists_url":"https://api.github.com/users/fsoikin/gists{/gist_id}","starred_url":"https://api.github.com/users/fsoikin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsoikin/subscriptions","organizations_url":"https://api.github.com/users/fsoikin/orgs","repos_url":"https://api.github.com/users/fsoikin/repos","events_url":"https://api.github.com/users/fsoikin/events{/privacy}","received_events_url":"https://api.github.com/users/fsoikin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20Proposal","name":"Needs Proposal","color":"556b75"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2014-07-28T23:13:19Z","updated_at":"2015-08-06T14:27:48Z","closed_at":null,"body":"The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case that it most dear to my heart is Knockout:\r\n\r\n```\r\ninterface Observable<T> {\r\n   <U>( this: U, value: T ): U;\r\n}\r\n\r\nvar viewModel = {\r\n   Str: ko.observable( \"abc\" ),\r\n   Num: ko.observable( 5 )\r\n};\r\n\r\nviewModel.Str( \"xyz\" ).Num( 10 );\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/128391662","html_url":"https://github.com/Microsoft/TypeScript/issues/285#issuecomment-128391662","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/285","id":128391662,"user":{"login":"hypery2k","id":979121,"avatar_url":"https://avatars.githubusercontent.com/u/979121?v=3","gravatar_id":"","url":"https://api.github.com/users/hypery2k","html_url":"https://github.com/hypery2k","followers_url":"https://api.github.com/users/hypery2k/followers","following_url":"https://api.github.com/users/hypery2k/following{/other_user}","gists_url":"https://api.github.com/users/hypery2k/gists{/gist_id}","starred_url":"https://api.github.com/users/hypery2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypery2k/subscriptions","organizations_url":"https://api.github.com/users/hypery2k/orgs","repos_url":"https://api.github.com/users/hypery2k/repos","events_url":"https://api.github.com/users/hypery2k/events{/privacy}","received_events_url":"https://api.github.com/users/hypery2k/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T14:27:48Z","updated_at":"2015-08-06T14:27:48Z","body":"any news on this issue?"}}