Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate @constructor tag? #12

Open
leoj3n opened this issue Jun 12, 2017 · 0 comments
Open

Deprecate @constructor tag? #12

leoj3n opened this issue Jun 12, 2017 · 0 comments

Comments

@leoj3n
Copy link
Contributor

leoj3n commented Jun 12, 2017

@constructor is hidden here:

https://github.com/bitovi/documentjs/blob/master/lib/tags/constructor.js#L9
https://github.com/bit-docs/bit-docs-js/blob/master/tags/constructor.js#L9

Because it is deprecated in favor of @function (a constructor is a function).

@class does this => console.warn("Using the @class directive. It is deprecated!");:

https://github.com/bit-docs/bit-docs-js/blob/master/tags/class.js#L17

Should we do something similar to console.warn for @constructor, then?

Note that JSDoc (what bit-docs is based on) talks about using @constructor:

http://usejsdoc.org/about-getting-started.html#adding-documentation-comments-to-your-code

I'm not sure if there's any functional difference between @function and @constructor, or if it's just more explicit terminology. I think fewer tags are better, especially if they duplicate functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant