/wiki/TagConstructs.wiki

http://jsdoc-toolkit.googlecode.com/ · Unknown · 34 lines · 27 code · 7 blank · 0 comment · 0 complexity · b3076491c6e04e2098abaade4032cca4 MD5 · raw file

  1. #summary @constructs
  2. == The @constructs Tag ==
  3. When using the `@lends` tag, the `@constructs` tag allows you to document that a particular function will be used to construct instances of the class.
  4. === Syntax ===
  5. {{{
  6. @constructs
  7. }}}
  8. === Example ===
  9. {{{
  10. var Person = makeClass(
  11. /**
  12. @lends Person.prototype
  13. */
  14. {
  15. /** @constructs */
  16. initialize: function(name) {
  17. this.name = name;
  18. },
  19. say: function(message) {
  20. return this.name + " says: " + message;
  21. }
  22. }
  23. );
  24. }}}
  25. Note: that when using this tag you should not also use the `@constructor` or `@class` to document the class in another doclet, all documentation for the class should go in the `@constructs` doc comment instead.
  26. == See Also ==
  27. * The [TagLends @lends] tag.