{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12459","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12459/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12459/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/12459/events","html_url":"https://github.com/Microsoft/TypeScript/issues/12459","id":191183673,"number":12459,"title":"Property decorator not recognizing classes as types","user":{"login":"yesman85","id":1142915,"avatar_url":"https://avatars.githubusercontent.com/u/1142915?v=3","gravatar_id":"","url":"https://api.github.com/users/yesman85","html_url":"https://github.com/yesman85","followers_url":"https://api.github.com/users/yesman85/followers","following_url":"https://api.github.com/users/yesman85/following{/other_user}","gists_url":"https://api.github.com/users/yesman85/gists{/gist_id}","starred_url":"https://api.github.com/users/yesman85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesman85/subscriptions","organizations_url":"https://api.github.com/users/yesman85/orgs","repos_url":"https://api.github.com/users/yesman85/repos","events_url":"https://api.github.com/users/yesman85/events{/privacy}","received_events_url":"https://api.github.com/users/yesman85/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-23T03:52:04Z","updated_at":"2016-11-26T23:41:27Z","closed_at":"2016-11-26T23:41:27Z","body":"I have read upon this a few times but couldn't get a satisfying answer.\r\n\r\nConsidering this code:\r\n\r\n```ts\r\n\r\nexport class Main {\r\n    @decorator\r\n    public prop: Test;\r\n}\r\n\r\nexport class Test {\r\n    public static name: string = 'test';\r\n}\r\n\r\nexport function decorator(target: Object, property: string) {\r\n    console.log(target);\r\n    console.log(property);\r\n\r\n    let typeName: string = Reflect.getOwnMetadata(\"design:type\", target, property);\r\n    console.log(typeName);\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\ntypeName should return me \"Test\", instead it's undefined.\r\n\r\nThe generates JS seems OK:\r\n```js\r\n    __decorate([\r\n        module_1.decorator,\r\n        __metadata('design:type', Test)\r\n    ], Main.prototype, 'prop', void 0);\r\n```\r\n\r\nIs there a limitation on decorators that only non-complex types work?"}}
{"actor":{"display_login":"yesman85"}}