{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28789","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28789/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28789/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28789/events","html_url":"https://github.com/Microsoft/TypeScript/issues/28789","id":386465207,"node_id":"MDU6SXNzdWUzODY0NjUyMDc=","number":28789,"title":"Only the last signature of an overloaded function is allowed in Parameters<T>","user":{"login":"yuhlau","id":16665951,"node_id":"MDQ6VXNlcjE2NjY1OTUx","avatar_url":"https://avatars1.githubusercontent.com/u/16665951?v=4","gravatar_id":"","url":"https://api.github.com/users/yuhlau","html_url":"https://github.com/yuhlau","followers_url":"https://api.github.com/users/yuhlau/followers","following_url":"https://api.github.com/users/yuhlau/following{/other_user}","gists_url":"https://api.github.com/users/yuhlau/gists{/gist_id}","starred_url":"https://api.github.com/users/yuhlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuhlau/subscriptions","organizations_url":"https://api.github.com/users/yuhlau/orgs","repos_url":"https://api.github.com/users/yuhlau/repos","events_url":"https://api.github.com/users/yuhlau/events{/privacy}","received_events_url":"https://api.github.com/users/yuhlau/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-01T14:54:42Z","updated_at":"2018-12-01T15:50:21Z","closed_at":"2018-12-01T15:49:25Z","author_association":"NONE","body":"<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.2.1\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** `overloaded function`. `overloaded signature`, `overloaded arguments`\r\n\r\n**Code**\r\n\r\n```ts\r\nfunction testFn(a: string): boolean;\r\nfunction testFn(a: number): boolean;\r\nfunction testFn(a: boolean): boolean;\r\nfunction testFn(_a: string | number | boolean): boolean {\r\n  return true;\r\n}\r\n\r\ninterface Stub {\r\n  callsFake(...args: Parameters<typeof testFn>): void\r\n}\r\n\r\nconst stub1: Stub = {\r\n  callsFake(_a: string): boolean {\r\n    return true;\r\n  }\r\n}\r\nconst stub2: Stub = {\r\n  callsFake(_a: number): boolean {\r\n    return true;\r\n  }\r\n}\r\nconst stub3: Stub = {\r\n  callsFake(_a: boolean): boolean {\r\n    return true;\r\n  }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nExpected `stub1` and `stub2` to be compiled without any error.\r\n\r\n**Actual behavior:**\r\n\r\nBoth `stub1` and `stub2` shows\r\n```\r\nType '(_a: string) => boolean' is not assignable to type '(a: boolean) => any'.\r\n  Types of parameters '_a' and 'a' are incompatible.\r\n    Type 'boolean' is not assignable to type 'string'. [2322]\r\n```\r\n\r\n**Playground Link:** <!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\nhttp://www.typescriptlang.org/play/#src=function%20testFn(a%3A%20string)%3A%20boolean%3B%0D%0Afunction%20testFn(a%3A%20number)%3A%20boolean%3B%0D%0Afunction%20testFn(a%3A%20boolean)%3A%20boolean%3B%0D%0Afunction%20testFn(_a%3A%20string%20%7C%20number%20%7C%20boolean)%3A%20boolean%20%7B%0D%0A%20%20return%20true%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20Stub%20%7B%0D%0A%20%20callsFake(...args%3A%20Parameters%3Ctypeof%20testFn%3E)%3A%20void%0D%0A%7D%0D%0A%0D%0Aconst%20stub1%3A%20Stub%20%3D%20%7B%0D%0A%20%20callsFake(_a%3A%20string)%3A%20boolean%20%7B%0D%0A%20%20%20%20return%20true%3B%0D%0A%20%20%7D%0D%0A%7D%0D%0Aconst%20stub2%3A%20Stub%20%3D%20%7B%0D%0A%20%20callsFake(_a%3A%20number)%3A%20boolean%20%7B%0D%0A%20%20%20%20return%20true%3B%0D%0A%20%20%7D%0D%0A%7D%0D%0Aconst%20stub3%3A%20Stub%20%3D%20%7B%0D%0A%20%20callsFake(_a%3A%20boolean)%3A%20boolean%20%7B%0D%0A%20%20%20%20return%20true%3B%0D%0A%20%20%7D%0D%0A%7D\r\n\r\n**Related Issues:** <!-- Did you find other bugs that looked similar? -->\r\nhttps://github.com/Microsoft/TypeScript/issues/13570\r\nThe closest I can find is this but it has generic types at the first function's signature, I am not sure fundamentally do they refer to the same issue."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/443435560","html_url":"https://github.com/Microsoft/TypeScript/issues/28789#issuecomment-443435560","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/28789","id":443435560,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQzNTU2MA==","user":{"login":"MartinJohns","id":5269069,"node_id":"MDQ6VXNlcjUyNjkwNjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5269069?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinJohns","html_url":"https://github.com/MartinJohns","followers_url":"https://api.github.com/users/MartinJohns/followers","following_url":"https://api.github.com/users/MartinJohns/following{/other_user}","gists_url":"https://api.github.com/users/MartinJohns/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinJohns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinJohns/subscriptions","organizations_url":"https://api.github.com/users/MartinJohns/orgs","repos_url":"https://api.github.com/users/MartinJohns/repos","events_url":"https://api.github.com/users/MartinJohns/events{/privacy}","received_events_url":"https://api.github.com/users/MartinJohns/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T15:50:21Z","updated_at":"2018-12-01T15:50:21Z","author_association":"NONE","body":"Oh, direct linking **is** possible! I did not bother check the markup, just assumed there would be a visible anchor."}}
{"actor":{"display_login":"MartinJohns"}}