{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12343","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12343/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12343/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12343/events","html_url":"https://github.com/Microsoft/TypeScript/issues/12343","id":190249200,"number":12343,"title":"Declaration emit for function parameter type references incorrect type alias","user":{"login":"vsiao","id":980673,"avatar_url":"https://avatars.githubusercontent.com/u/980673?v=3","gravatar_id":"","url":"https://api.github.com/users/vsiao","html_url":"https://github.com/vsiao","followers_url":"https://api.github.com/users/vsiao/followers","following_url":"https://api.github.com/users/vsiao/following{/other_user}","gists_url":"https://api.github.com/users/vsiao/gists{/gist_id}","starred_url":"https://api.github.com/users/vsiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsiao/subscriptions","organizations_url":"https://api.github.com/users/vsiao/orgs","repos_url":"https://api.github.com/users/vsiao/repos","events_url":"https://api.github.com/users/vsiao/events{/privacy}","received_events_url":"https://api.github.com/users/vsiao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-18T06:55:08Z","updated_at":"2016-11-18T06:55:08Z","closed_at":null,"body":"**TypeScript Version:**  2.0.10 (broken since 2.0.2).\r\n\r\n**Code**\r\n\r\n```ts\r\nexport type Foo<A, B> = A | B;\r\nexport type Bar<T> = Foo<number, T>;\r\n\r\nexport const f = <T>(bar: Bar<T>) => {\r\n    return true;\r\n};\r\n```\r\n\r\n**Expected behavior:**\r\n`tsc --declaration bar.ts` should emit the following `bar.d.ts`:\r\n\r\n```ts\r\nexport declare type Foo<A, B> = A | B;\r\nexport declare type Bar<T> = Foo<number, T>;\r\nexport declare const f: <T>(bar: Bar<T>) => boolean;\r\n```\r\n\r\nNB: 2.0.0 emits `<T>(bar: number | T) => boolean`, which is acceptable too.\r\n\r\n**Actual behavior:**\r\n```ts\r\nexport declare type Foo<A, B> = A | B;\r\nexport declare type Bar<T> = Foo<number, T>;\r\nexport declare const f: <T>(bar: Foo<T>) => boolean; \r\n// TS2314: Generic type 'Foo' requires 2 type argument(s).\r\n```"}}
{"actor":{"display_login":"vsiao"}}