{"action":"created","issue":{"url":"https://api.github.com/repos/microsoft/TypeScript/issues/32436","repository_url":"https://api.github.com/repos/microsoft/TypeScript","labels_url":"https://api.github.com/repos/microsoft/TypeScript/issues/32436/labels{/name}","comments_url":"https://api.github.com/repos/microsoft/TypeScript/issues/32436/comments","events_url":"https://api.github.com/repos/microsoft/TypeScript/issues/32436/events","html_url":"https://github.com/microsoft/TypeScript/issues/32436","id":468955336,"node_id":"MDU6SXNzdWU0Njg5NTUzMzY=","number":32436,"title":"Type inference not works inside function while works well on params","user":{"login":"k8w","id":1681689,"node_id":"MDQ6VXNlcjE2ODE2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/1681689?v=4","gravatar_id":"","url":"https://api.github.com/users/k8w","html_url":"https://github.com/k8w","followers_url":"https://api.github.com/users/k8w/followers","following_url":"https://api.github.com/users/k8w/following{/other_user}","gists_url":"https://api.github.com/users/k8w/gists{/gist_id}","starred_url":"https://api.github.com/users/k8w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8w/subscriptions","organizations_url":"https://api.github.com/users/k8w/orgs","repos_url":"https://api.github.com/users/k8w/repos","events_url":"https://api.github.com/users/k8w/events{/privacy}","received_events_url":"https://api.github.com/users/k8w/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-07-17T02:35:14Z","updated_at":"2019-07-17T14:18:22Z","closed_at":null,"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.5.3\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** Type inference function\r\n\r\n**Code**\r\n\r\n```ts\r\ninterface ValueType {\r\n    a: { a: string };\r\n    b: { b: string };\r\n    c: { c: string };\r\n}\r\n\r\nfunction setValue<T extends keyof ValueType>(key: T, value: ValueType[T]) {\r\n    if (key === 'a') {\r\n        console.log(value.a);\r\n    }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nCompile succ\r\n\r\n**Actual behavior:**\r\ntest.ts:9:27 - error TS2339: Property 'a' does not exist on type 'ValueType[T]'.\r\n9         console.log(value.a);\r\n\r\n**Playground Link:** <!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\n\r\n**Related Issues:** <!-- Did you find other bugs that looked similar? -->\r\nhttps://github.com/microsoft/TypeScript/issues/31904\r\n"},"comment":{"url":"https://api.github.com/repos/microsoft/TypeScript/issues/comments/512275204","html_url":"https://github.com/microsoft/TypeScript/issues/32436#issuecomment-512275204","issue_url":"https://api.github.com/repos/microsoft/TypeScript/issues/32436","id":512275204,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMjI3NTIwNA==","user":{"login":"jack-williams","id":4489219,"node_id":"MDQ6VXNlcjQ0ODkyMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/4489219?v=4","gravatar_id":"","url":"https://api.github.com/users/jack-williams","html_url":"https://github.com/jack-williams","followers_url":"https://api.github.com/users/jack-williams/followers","following_url":"https://api.github.com/users/jack-williams/following{/other_user}","gists_url":"https://api.github.com/users/jack-williams/gists{/gist_id}","starred_url":"https://api.github.com/users/jack-williams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack-williams/subscriptions","organizations_url":"https://api.github.com/users/jack-williams/orgs","repos_url":"https://api.github.com/users/jack-williams/repos","events_url":"https://api.github.com/users/jack-williams/events{/privacy}","received_events_url":"https://api.github.com/users/jack-williams/received_events","type":"User","site_admin":false},"created_at":"2019-07-17T14:18:22Z","updated_at":"2019-07-17T14:18:22Z","author_association":"CONTRIBUTOR","body":"Duplicate of #13995."}}
{"actor":{"display_login":"jack-williams"}}