{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4187","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4187/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4187/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4187/events","html_url":"https://github.com/Microsoft/TypeScript/issues/4187","id":99433638,"number":4187,"title":"Infer type construct signature and infer type parameter signature","user":{"login":"tinganho","id":1324476,"avatar_url":"https://avatars.githubusercontent.com/u/1324476?v=3","gravatar_id":"","url":"https://api.github.com/users/tinganho","html_url":"https://github.com/tinganho","followers_url":"https://api.github.com/users/tinganho/followers","following_url":"https://api.github.com/users/tinganho/following{/other_user}","gists_url":"https://api.github.com/users/tinganho/gists{/gist_id}","starred_url":"https://api.github.com/users/tinganho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinganho/subscriptions","organizations_url":"https://api.github.com/users/tinganho/orgs","repos_url":"https://api.github.com/users/tinganho/repos","events_url":"https://api.github.com/users/tinganho/events{/privacy}","received_events_url":"https://api.github.com/users/tinganho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-06T13:27:25Z","updated_at":"2015-08-06T13:38:32Z","closed_at":null,"body":"I know that you only contextually type values.\r\n\r\nBut it hurt my finger when having to type the signature of a construct when it could be contextually typed:\r\n```typescript\r\nfunction(a: new<P extends Props, S, E extends Elements>(props: Props, children: Child[]) => Component<P, S, E>)) {\r\n}\r\n```\r\nIt also hurts my fingers when I have to redeclare the type parameters if they should just be the same. Why can't all of the above be written as:\r\n\r\n```typescript\r\nfunction(a: new => Component) {\r\n}\r\n```\r\nWe infer the construct signature and we also infer the type parameter signature."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/128368145","html_url":"https://github.com/Microsoft/TypeScript/issues/4187#issuecomment-128368145","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4187","id":128368145,"user":{"login":"OlegDokuka","id":5380167,"avatar_url":"https://avatars.githubusercontent.com/u/5380167?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegDokuka","html_url":"https://github.com/OlegDokuka","followers_url":"https://api.github.com/users/OlegDokuka/followers","following_url":"https://api.github.com/users/OlegDokuka/following{/other_user}","gists_url":"https://api.github.com/users/OlegDokuka/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegDokuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegDokuka/subscriptions","organizations_url":"https://api.github.com/users/OlegDokuka/orgs","repos_url":"https://api.github.com/users/OlegDokuka/repos","events_url":"https://api.github.com/users/OlegDokuka/events{/privacy}","received_events_url":"https://api.github.com/users/OlegDokuka/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T13:38:32Z","updated_at":"2015-08-06T13:38:32Z","body":"it will be cool if provide somesing like Class in java where we can declare it like Class or Class<any> \r\n\r\nI `v provided it yet but only Class type \r\n\r\n```\r\nmodule Typejector.Type {\r\n    export type Class = { new (): any };\r\n} \r\n```\r\n\r\nbut in this way we lost \r\n\r\n``` \r\nClass<any>\r\n\r\n``` \r\n\r\nof course we can do something like \r\n\r\n```\r\nmodule Typejector.Type {\r\n    export interface Class<T.> { new (): any };\r\n} \r\n```\r\n\r\nbut it is not that we realy want"}}