{"action":"opened","issue":{"url":"https://api.github.com/repos/senchalabs/jsduck/issues/641","repository_url":"https://api.github.com/repos/senchalabs/jsduck","labels_url":"https://api.github.com/repos/senchalabs/jsduck/issues/641/labels{/name}","comments_url":"https://api.github.com/repos/senchalabs/jsduck/issues/641/comments","events_url":"https://api.github.com/repos/senchalabs/jsduck/issues/641/events","html_url":"https://github.com/senchalabs/jsduck/issues/641","id":131472270,"number":641,"title":"Allow @constructor to be ","user":{"login":"Krinkle","id":156867,"avatar_url":"https://avatars.githubusercontent.com/u/156867?v=3","gravatar_id":"","url":"https://api.github.com/users/Krinkle","html_url":"https://github.com/Krinkle","followers_url":"https://api.github.com/users/Krinkle/followers","following_url":"https://api.github.com/users/Krinkle/following{/other_user}","gists_url":"https://api.github.com/users/Krinkle/gists{/gist_id}","starred_url":"https://api.github.com/users/Krinkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krinkle/subscriptions","organizations_url":"https://api.github.com/users/Krinkle/orgs","repos_url":"https://api.github.com/users/Krinkle/repos","events_url":"https://api.github.com/users/Krinkle/events{/privacy}","received_events_url":"https://api.github.com/users/Krinkle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-04T20:59:02Z","updated_at":"2016-02-04T20:59:02Z","closed_at":null,"body":"See also https://github.com/jscs-dev/jscs-jsdoc/issues/190.\r\n\r\nIt should be possible (for consistency with classes, methods and properties) to have the `@constructor` tag after the description instead of before.\r\n\r\nThis is typically complicated because JavaScript developers often define the constructor in the same block as the class. And we obviously want to avoid ambiguity between the description of the class and that of the constructor.\r\n\r\nConsider the following examples:\r\n\r\n```js\r\n/**\r\n * Description 1A.\r\n *\r\n * @class mw.Foo\r\n * @constructor\r\n * @param y\r\n */\r\nfunction Foo (y) {}\r\n// ^ Works.\r\n\r\n/**\r\n * Description 2A.\r\n *\r\n * @class mw.Foo\r\n *\r\n * Description 2B.\r\n *\r\n * @constructor\r\n * @param y\r\n */\r\nfunction Foo (y) {}\r\n// ^ Doesn't work.\r\n// Uses B as class description, A is ignored, constructor has no description.\r\n\r\n/**\r\n * Description 3A.\r\n *\r\n * @class mw.Foo\r\n */\r\n/**\r\n * Description 3B.\r\n *\r\n * @constructor\r\n * @param y\r\n */\r\nfunction Foo (y) {}\r\n// ^ Doesn't work.\r\n// @constructor implicitly creates a new \"@class Foo\" when not in the same block\r\n```\r\n\r\nWorked around for now by using separate blocks (per the issue in example 2), and by switching to `@method constructor` instead of `@constructor`.\r\n\r\nUntil just now I wasn't aware of `@constructor` being deprecated. If there is no intent to backport this from `@method`, feel free to close this. Just filing it for the record and for someone else to find perhaps."}}