payload: {"action":"created","issue":{"url":"https://api.github.com/repos/microsoft/TypeScript/issues/36025","repository_url":"https://api.github.com/repos/microsoft/TypeScript","labels_url":"https://api.github.com/repos/microsoft/TypeScript/issues/36025/labels{/name}","comments_url":"https://api.github.com/repos/microsoft/TypeScript/issues/36025/comments","events_url":"https://api.github.com/repos/microsoft/TypeScript/issues/36025/events","html_url":"https://github.com/microsoft/TypeScript/issues/36025","id":545717233,"node_id":"MDU6SXNzdWU1NDU3MTcyMzM=","number":36025,"title":"Keyof function args suggest all keys","user":{"login":"ar53n","id":7085102,"node_id":"MDQ6VXNlcjcwODUxMDI=","avatar_url":"https://avatars0.githubusercontent.com/u/7085102?v=4","gravatar_id":"","url":"https://api.github.com/users/ar53n","html_url":"https://github.com/ar53n","followers_url":"https://api.github.com/users/ar53n/followers","following_url":"https://api.github.com/users/ar53n/following{/other_user}","gists_url":"https://api.github.com/users/ar53n/gists{/gist_id}","starred_url":"https://api.github.com/users/ar53n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ar53n/subscriptions","organizations_url":"https://api.github.com/users/ar53n/orgs","repos_url":"https://api.github.com/users/ar53n/repos","events_url":"https://api.github.com/users/ar53n/events{/privacy}","received_events_url":"https://api.github.com/users/ar53n/received_events","type":"User","site_admin":false},"labels":[{"id":113971226,"node_id":"MDU6TGFiZWwxMTM5NzEyMjY=","url":"https://api.github.com/repos/microsoft/TypeScript/labels/Duplicate","name":"Duplicate","color":"f7c6c7","default":false,"description":"An existing issue was already created"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2020-01-06T13:07:54Z","updated_at":"2020-01-09T18:00:05Z","closed_at":"2020-01-09T18:00:04Z","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<!--\r\nPlease try to reproduce the issue with the latest published version. It may have already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n-->\r\n**TypeScript Version:**  3.7.2\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nkeyof interface function arguments args\r\n\r\n**Code**\r\n\r\n```ts\r\n\r\nexport interface ISocialButtonTypes {\r\n  vk: {vk: string};\r\n  fb: {fb: string};\r\n  ok: {ok: string};\r\n  twitter: {tw: string};\r\n};\r\n\r\nexport type createSocialItem = <T extends keyof ISocialButtonTypes>(\r\n  socialType: T,\r\n  params: ISocialButtonTypes[T]\r\n) => void;\r\n\r\nfunction createSocialItem<T extends keyof ISocialButtonTypes>(\r\n  socialType: T,\r\n  params?: ISocialButtonTypes[T]\r\n): ISocialButtonTypes[T] {\r\n  return params\r\n}\r\n// the compiler show error, but suggest all keys\r\ncreateSocialItem('vk', { ok: 'dwdw' })\r\n                        ~~~~~~~~~~~~~\r\n```\r\n\r\n**Expected behavior:**\r\nThe second param should suggest only `vk` key.\r\n\r\n**Actual behavior:**\r\nThe params field suggests all keys, but the compiler show error on the incorrect key. The function return works correctly\r\n\r\n**Playground Link:** <!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\nhttps://cutt.ly/cruK8eX\r\n\r\n**Related Issues:** <!-- Did you find other bugs that looked similar? -->\r\n"},"comment":{"url":"https://api.github.com/repos/microsoft/TypeScript/issues/comments/572679845","html_url":"https://github.com/microsoft/TypeScript/issues/36025#issuecomment-572679845","issue_url":"https://api.github.com/repos/microsoft/TypeScript/issues/36025","id":572679845,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MjY3OTg0NQ==","user":{"login":"typescript-bot","id":23042052,"node_id":"MDQ6VXNlcjIzMDQyMDUy","avatar_url":"https://avatars0.githubusercontent.com/u/23042052?v=4","gravatar_id":"","url":"https://api.github.com/users/typescript-bot","html_url":"https://github.com/typescript-bot","followers_url":"https://api.github.com/users/typescript-bot/followers","following_url":"https://api.github.com/users/typescript-bot/following{/other_user}","gists_url":"https://api.github.com/users/typescript-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/typescript-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typescript-bot/subscriptions","organizations_url":"https://api.github.com/users/typescript-bot/orgs","repos_url":"https://api.github.com/users/typescript-bot/repos","events_url":"https://api.github.com/users/typescript-bot/events{/privacy}","received_events_url":"https://api.github.com/users/typescript-bot/received_events","type":"User","site_admin":false},"created_at":"2020-01-09T18:00:05Z","updated_at":"2020-01-09T18:00:05Z","author_association":"COLLABORATOR","body":"This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes."}}
other: {"actor":{"display_login":"typescript-bot"}}