{"action":"closed","issue":{"url":"https://api.github.com/repos/inversify/InversifyJS/issues/247","repository_url":"https://api.github.com/repos/inversify/InversifyJS","labels_url":"https://api.github.com/repos/inversify/InversifyJS/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/inversify/InversifyJS/issues/247/comments","events_url":"https://api.github.com/repos/inversify/InversifyJS/issues/247/events","html_url":"https://github.com/inversify/InversifyJS/issues/247","id":160384828,"number":247,"title":"False \"Missing required @injectable annotation in...\" exception","user":{"login":"remojansen","id":10656223,"avatar_url":"https://avatars.githubusercontent.com/u/10656223?v=3","gravatar_id":"","url":"https://api.github.com/users/remojansen","html_url":"https://github.com/remojansen","followers_url":"https://api.github.com/users/remojansen/followers","following_url":"https://api.github.com/users/remojansen/following{/other_user}","gists_url":"https://api.github.com/users/remojansen/gists{/gist_id}","starred_url":"https://api.github.com/users/remojansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remojansen/subscriptions","organizations_url":"https://api.github.com/users/remojansen/orgs","repos_url":"https://api.github.com/users/remojansen/repos","events_url":"https://api.github.com/users/remojansen/events{/privacy}","received_events_url":"https://api.github.com/users/remojansen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/inversify/InversifyJS/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"remojansen","id":10656223,"avatar_url":"https://avatars.githubusercontent.com/u/10656223?v=3","gravatar_id":"","url":"https://api.github.com/users/remojansen","html_url":"https://github.com/remojansen","followers_url":"https://api.github.com/users/remojansen/followers","following_url":"https://api.github.com/users/remojansen/following{/other_user}","gists_url":"https://api.github.com/users/remojansen/gists{/gist_id}","starred_url":"https://api.github.com/users/remojansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remojansen/subscriptions","organizations_url":"https://api.github.com/users/remojansen/orgs","repos_url":"https://api.github.com/users/remojansen/repos","events_url":"https://api.github.com/users/remojansen/events{/privacy}","received_events_url":"https://api.github.com/users/remojansen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inversify/InversifyJS/milestones/11","html_url":"https://github.com/inversify/InversifyJS/milestones/2.0.0-rc.1","labels_url":"https://api.github.com/repos/inversify/InversifyJS/milestones/11/labels","id":1737666,"number":11,"title":"2.0.0-rc.1","description":"","creator":{"login":"remojansen","id":10656223,"avatar_url":"https://avatars.githubusercontent.com/u/10656223?v=3","gravatar_id":"","url":"https://api.github.com/users/remojansen","html_url":"https://github.com/remojansen","followers_url":"https://api.github.com/users/remojansen/followers","following_url":"https://api.github.com/users/remojansen/following{/other_user}","gists_url":"https://api.github.com/users/remojansen/gists{/gist_id}","starred_url":"https://api.github.com/users/remojansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remojansen/subscriptions","organizations_url":"https://api.github.com/users/remojansen/orgs","repos_url":"https://api.github.com/users/remojansen/repos","events_url":"https://api.github.com/users/remojansen/events{/privacy}","received_events_url":"https://api.github.com/users/remojansen/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":22,"state":"open","created_at":"2016-04-29T00:03:57Z","updated_at":"2016-06-20T22:18:06Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-06-15T10:05:43Z","updated_at":"2016-06-20T22:18:06Z","closed_at":"2016-06-20T22:18:06Z","body":"## Expected Behavior\r\nThe following should work or throw an error that helps developers:\r\n```ts\r\n@injectable()\r\nclass Samurai implements ISamurai {\r\n\r\n    public rank: string;\r\n\r\n    public constructor(rank: string) {\r\n        this.rank = rank;\r\n    }\r\n}\r\n\r\n@injectable()\r\nclass SamuraiMaster extends Samurai implements ISamurai {\r\n    constructor() {\r\n        super(\"Master\");\r\n    }\r\n}\r\n```\r\n\r\n## Current Behavior\r\nThe current error is misleading:\r\n> Missing required @injectable annotation in: SamuraiMaster.\r\n\r\n## Possible Solution\r\n[I don't think we are going to be able to implement this is an efficient/elegant manner](http://stackoverflow.com/questions/37432443/how-to-identify-missing-constructor-arguments-in-base-derived-classes) so the best thing we can do is to provide a more friendly error. Something like:\r\n\r\n> When extending a class both parent and child classes must have the same number of constructor arguments. Read https://github.com/inversify/InversifyJS/blob/master/wiki/inheritance.md for more info.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"remojansen"}}