PageRenderTime 27ms CodeModel.GetById 25ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 3== The @constructs Tag ==
 4
 5When using the `@lends` tag, the `@constructs` tag allows you to document that a particular function will be used to construct instances of the class.
 6
 7=== Syntax ===
 8{{{
 9@constructs
10}}}
11  
12=== Example ===
13
14{{{
15var Person = makeClass(
16    /**
17      @lends Person.prototype
18    */
19    {
20        /** @constructs */
21        initialize: function(name) {
22            this.name = name;
23        },
24        say: function(message) {
25            return this.name + " says: " + message;
26        }
27    }
28);
29}}}
30
31Note: 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.
32
33== See Also ==
34  * The [TagLends @lends] tag.