{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/29225","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/29225/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/29225/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/29225/events","html_url":"https://github.com/Microsoft/TypeScript/issues/29225","id":395157801,"node_id":"MDU6SXNzdWUzOTUxNTc4MDE=","number":29225,"title":"Why I use function generic parameters as the other type's generic has compile error?","user":{"login":"linmodev","id":21982105,"node_id":"MDQ6VXNlcjIxOTgyMTA1","avatar_url":"https://avatars0.githubusercontent.com/u/21982105?v=4","gravatar_id":"","url":"https://api.github.com/users/linmodev","html_url":"https://github.com/linmodev","followers_url":"https://api.github.com/users/linmodev/followers","following_url":"https://api.github.com/users/linmodev/following{/other_user}","gists_url":"https://api.github.com/users/linmodev/gists{/gist_id}","starred_url":"https://api.github.com/users/linmodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linmodev/subscriptions","organizations_url":"https://api.github.com/users/linmodev/orgs","repos_url":"https://api.github.com/users/linmodev/repos","events_url":"https://api.github.com/users/linmodev/events{/privacy}","received_events_url":"https://api.github.com/users/linmodev/received_events","type":"User","site_admin":false},"labels":[{"id":113970366,"node_id":"MDU6TGFiZWwxMTM5NzAzNjY=","url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":{"login":"ahejlsberg","id":4226954,"node_id":"MDQ6VXNlcjQyMjY5NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4226954?v=4","gravatar_id":"","url":"https://api.github.com/users/ahejlsberg","html_url":"https://github.com/ahejlsberg","followers_url":"https://api.github.com/users/ahejlsberg/followers","following_url":"https://api.github.com/users/ahejlsberg/following{/other_user}","gists_url":"https://api.github.com/users/ahejlsberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ahejlsberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahejlsberg/subscriptions","organizations_url":"https://api.github.com/users/ahejlsberg/orgs","repos_url":"https://api.github.com/users/ahejlsberg/repos","events_url":"https://api.github.com/users/ahejlsberg/events{/privacy}","received_events_url":"https://api.github.com/users/ahejlsberg/received_events","type":"User","site_admin":false},"assignees":[{"login":"ahejlsberg","id":4226954,"node_id":"MDQ6VXNlcjQyMjY5NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4226954?v=4","gravatar_id":"","url":"https://api.github.com/users/ahejlsberg","html_url":"https://github.com/ahejlsberg","followers_url":"https://api.github.com/users/ahejlsberg/followers","following_url":"https://api.github.com/users/ahejlsberg/following{/other_user}","gists_url":"https://api.github.com/users/ahejlsberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ahejlsberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahejlsberg/subscriptions","organizations_url":"https://api.github.com/users/ahejlsberg/orgs","repos_url":"https://api.github.com/users/ahejlsberg/repos","events_url":"https://api.github.com/users/ahejlsberg/events{/privacy}","received_events_url":"https://api.github.com/users/ahejlsberg/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/79","html_url":"https://github.com/Microsoft/TypeScript/milestone/79","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/79/labels","id":3721640,"node_id":"MDk6TWlsZXN0b25lMzcyMTY0MA==","number":79,"title":"TypeScript 3.3","description":"TypeScript 3.3 RC","creator":{"login":"RyanCavanaugh","id":6685088,"node_id":"MDQ6VXNlcjY2ODUwODg=","avatar_url":"https://avatars3.githubusercontent.com/u/6685088?v=4","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"open_issues":343,"closed_issues":70,"state":"open","created_at":"2018-10-08T17:13:40Z","updated_at":"2019-01-02T21:11:33Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2019-01-02T06:18:29Z","updated_at":"2019-01-03T02:03:04Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.3.0-dev.20190101\r\n\r\n<!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** Why I use function generic parameters as the other type's generic has compile error?\r\n\r\n**Code**\r\n\r\n```ts\r\nfunction fn1<U extends UU, UU>() {\r\n\r\n    type T03<T> = {\r\n      action: T;\r\n    };\r\n    type T04<F extends FF, FF> = T03<F> extends T03<FF> ? number : string;\r\n\r\n    let v2: T04<\"aaa\", string> = 222;\r\n    let v3: T04<U, UU> = 78787;\r\n  }\r\n```\r\n\r\n**Expected behavior:**\r\n\r\n     expect v3' type is number\r\n\r\n**Actual behavior:**\r\n\r\n    Type '78787' is not assignable to type 'T04<U, UU>'.\r\n\r\n**Playground Link:** <!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior --> [Link](https://www.typescriptlang.org/play/index.html#src=function%20fn1%3CU%20extends%20UU%2C%20UU%3E()%20%7B%0D%0A%0D%0A%20%20%20%20type%20T03%3CT%3E%20%3D%20%7B%0D%0A%20%20%20%20%20%20action%3A%20T%3B%0D%0A%20%20%20%20%7D%3B%0D%0A%20%20%20%20type%20T04%3CF%20extends%20FF%2C%20FF%3E%20%3D%20T03%3CF%3E%20extends%20T03%3CFF%3E%20%3F%20number%20%3A%20string%3B%0D%0A%0D%0A%20%20%20%20let%20v2%3A%20T04%3C%22aaa%22%2C%20string%3E%20%3D%20222%3B%0D%0A%20%20%20%20let%20v3%3A%20T04%3CU%2C%20UU%3E%20%3D%2078787%3B%0D%0A%20%20%7D)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/451039656","html_url":"https://github.com/Microsoft/TypeScript/issues/29225#issuecomment-451039656","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/29225","id":451039656,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTAzOTY1Ng==","user":{"login":"linmodev","id":21982105,"node_id":"MDQ6VXNlcjIxOTgyMTA1","avatar_url":"https://avatars0.githubusercontent.com/u/21982105?v=4","gravatar_id":"","url":"https://api.github.com/users/linmodev","html_url":"https://github.com/linmodev","followers_url":"https://api.github.com/users/linmodev/followers","following_url":"https://api.github.com/users/linmodev/following{/other_user}","gists_url":"https://api.github.com/users/linmodev/gists{/gist_id}","starred_url":"https://api.github.com/users/linmodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linmodev/subscriptions","organizations_url":"https://api.github.com/users/linmodev/orgs","repos_url":"https://api.github.com/users/linmodev/repos","events_url":"https://api.github.com/users/linmodev/events{/privacy}","received_events_url":"https://api.github.com/users/linmodev/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T02:03:04Z","updated_at":"2019-01-03T02:03:04Z","author_association":"NONE","body":"@jack-williams  @fatcerberus  I have a another piece.I think is a similar question.\r\n\r\n```ts\r\nexport interface Action<T = any> {\r\n  type: T;\r\n}\r\nexport interface AnyAction extends Action {\r\n  [extraProps: string]: any;\r\n}\r\nexport type Reducer<S = any, A extends Action = AnyAction> = (\r\n  state: S | undefined,\r\n  action: A\r\n) => S;\r\nexport type ReducersMapObject<S extends any= any, A extends Action = Action> = {\r\n  [K in keyof S]: Reducer<S[K], A>\r\n};\r\n\r\n\r\nfunction assertShape<S extends any, A extends Action>(\r\n  reducers: ReducersMapObject<S, A>\r\n) {\r\n  let reducerKeys = Object.keys(reducers);\r\n  reducerKeys.forEach(key => {\r\n    let reducer = reducers[key];\r\n    const SET_AGE=\"set age haha\"\r\n    const action={\r\n      type:SET_AGE \r\n    }\r\n   // Argument of type '{ type: string; }' is not assignable to parameter of type 'A'.\r\n    reducer({sf:\"rewr\"}, action);\r\n  });\r\n}\r\n```"}}
{"actor":{"display_login":"linmodev"}}