{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3024","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3024/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3024/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3024/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3024","id":73109456,"number":3024,"title":"proper declaration for class decorator?","user":{"login":"cmichaelgraham","id":10272832,"avatar_url":"https://avatars.githubusercontent.com/u/10272832?v=3","gravatar_id":"","url":"https://api.github.com/users/cmichaelgraham","html_url":"https://github.com/cmichaelgraham","followers_url":"https://api.github.com/users/cmichaelgraham/followers","following_url":"https://api.github.com/users/cmichaelgraham/following{/other_user}","gists_url":"https://api.github.com/users/cmichaelgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/cmichaelgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmichaelgraham/subscriptions","organizations_url":"https://api.github.com/users/cmichaelgraham/orgs","repos_url":"https://api.github.com/users/cmichaelgraham/repos","events_url":"https://api.github.com/users/cmichaelgraham/events{/privacy}","received_events_url":"https://api.github.com/users/cmichaelgraham/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Question","name":"Question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-04T19:40:33Z","updated_at":"2015-05-04T20:55:41Z","closed_at":"2015-05-04T20:43:32Z","body":"i'm having difficulty figuring out the correct declaration for a class decorator.\r\n\r\nhere is the `.d.ts` i have:\r\n\r\n```javascript\r\n\texport function autoinject(target: any): void | ((target: any) => void);\r\n```\r\n\r\nhere is the autoinject class decorator in use:\r\n\r\n```javascript\r\nimport {autoinject} from 'aurelia-framework';\r\nimport {HttpClient} from 'aurelia-http-client';\r\n\r\n@autoinject\r\nexport class Flickr{\r\n  heading = 'Flickr';\r\n  images = [];\r\n  url = 'http://api.flickr.com/services/feeds/photos_public.gne?tags=rainier&tagmode=any&format=json';\r\n  http:HttpClient;\r\n  constructor(http:HttpClient){\r\n    this.http = http;\r\n  }\r\n```\r\n\r\nand here is the compiler error i get:\r\n\r\nError\t29\tBuild: Type '(target: any) => void | ((target: any) => void)' is not assignable to type '(target: typeof Flickr) => void | typeof Flickr'.\tC:\\a\\aurelia-typescript\\skel-nav-esri-vs-ts\\skel-nav-esri-vs-ts\\views\\flickr.ts\t4\t1\tskel-nav-esri-vs-ts\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/98847475","html_url":"https://github.com/Microsoft/TypeScript/issues/3024#issuecomment-98847475","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3024","id":98847475,"user":{"login":"cmichaelgraham","id":10272832,"avatar_url":"https://avatars.githubusercontent.com/u/10272832?v=3","gravatar_id":"","url":"https://api.github.com/users/cmichaelgraham","html_url":"https://github.com/cmichaelgraham","followers_url":"https://api.github.com/users/cmichaelgraham/followers","following_url":"https://api.github.com/users/cmichaelgraham/following{/other_user}","gists_url":"https://api.github.com/users/cmichaelgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/cmichaelgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmichaelgraham/subscriptions","organizations_url":"https://api.github.com/users/cmichaelgraham/orgs","repos_url":"https://api.github.com/users/cmichaelgraham/repos","events_url":"https://api.github.com/users/cmichaelgraham/events{/privacy}","received_events_url":"https://api.github.com/users/cmichaelgraham/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T20:55:41Z","updated_at":"2015-05-04T20:55:41Z","body":"made my day :+1: "}}