{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11702","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11702/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11702/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11702/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11702","id":183681289,"number":11702,"title":"TypeScript should be able to support method overloading","user":{"login":"series0ne","id":9935122,"avatar_url":"https://avatars.githubusercontent.com/u/9935122?v=3","gravatar_id":"","url":"https://api.github.com/users/series0ne","html_url":"https://github.com/series0ne","followers_url":"https://api.github.com/users/series0ne/followers","following_url":"https://api.github.com/users/series0ne/following{/other_user}","gists_url":"https://api.github.com/users/series0ne/gists{/gist_id}","starred_url":"https://api.github.com/users/series0ne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/series0ne/subscriptions","organizations_url":"https://api.github.com/users/series0ne/orgs","repos_url":"https://api.github.com/users/series0ne/repos","events_url":"https://api.github.com/users/series0ne/events{/privacy}","received_events_url":"https://api.github.com/users/series0ne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-18T13:08:12Z","updated_at":"2016-10-18T13:08:12Z","closed_at":null,"body":"Since TypeScript is statically typed, it should be able to infer method usage based on supplied parameters, however I can already see a potential limitation in the emitted code - as long as JS is considered \"read-only\" this probably wont matter (much)\r\n\r\n## Example\r\n\r\n```\r\nclass Test {\r\n    public getResult(value: string): boolean {\r\n        ...\r\n    }\r\n\r\n    public getResult(x: number, y: number, z: number): string {\r\n        ...\r\n    }\r\n}\r\n```\r\n\r\n## Compiled\r\n\r\n```\r\nvar Test = (function () {\r\n    function Test() {\r\n    }\r\n\r\n    Test.prototype.getResult$s0 = function(value) {\r\n        ...\r\n    }\r\n\r\n    Test.prototype.getResult$n0$n1$n2 = function(x, y, z) {\r\n        ...\r\n    }\r\n\r\n    return Test;\r\n})();\r\n```"}}
{"actor":{"display_login":"series0ne"}}