Comments (5)
@method isn't a recognized tag in JsDoc Toolikit 1.0, that is, it goes into the
general tags array so it's there, but the parser just ignores it (this in spite
of
the fact that it worked in previous versions). However, with the new parser in
1.0,
it's rare that you actually that you actually need it.
I need more code before I can tell what you are trying to do but I'll guess it's
something like this...
foo.prototype = {
/**
* Method that will be called to start the application
* @method
*/
start: function(){
// some coding
}
}
Which is results in "start" being documented as a method of "foo" with or
without the
@method tag (because the tag is ignored).
If you can provide a more complete example that proves the @method tag is
actually
required, I'll consider adding it.
Original comment by micmath
on 7 Jul 2007 at 7:12
from jsdoc-toolkit.
Original comment by micmath
on 7 Jul 2007 at 7:13
- Changed state: MoreInformationRequired
from jsdoc-toolkit.
Hi,
Actually my code is like this :
var foo1 = Class.create();
/* create inheritance */
Object.extend(foo1.prototype,foo2.prototype);
Object.extend(foo1.prototype,{
/** Method that will be called to start the application */
start: function(){
// some coding
}
}
I tried it also by removing @method (like example), but it is still not
documented.
After document generation, 'Constructor' is filled in correct and 'Objects',
but
the 'Function' part is empty and I don't see a 'Method' part.
Any ideas?
Thanks and kr.
Original comment by [email protected]
on 9 Jul 2007 at 7:58
from jsdoc-toolkit.
Hi again,
after some testing I noticed that all methods are well documented, except in
classes
which inherit from other classes (like the example above). Can this be fixed?
Thanks.
Original comment by [email protected]
on 9 Jul 2007 at 2:54
from jsdoc-toolkit.
Hello,
Your example is not standard JavaScript, that is it uses some syntax that is
not part
of the standard JavaScript language. So you'll need to use some slightly fancy
tags:
the @scope tag to tell the parser what your object literal will be named, and
the
@memberof tag to tell the parser that "start" is a method.
Inheritance documentation is not yet implemented in JsDoc Toolkit, but is
slated to
appear in release 1.1. It will use the @extends tag, as in /** @extends foo2 */
Note that @class is a synonym for @constructor, I used it here because it
seemed to
fit your syntax.
----
/** @class */
var foo1 = Class.create();
/* create inheritance, not yet implemented in jsdoc */
Object.extend(foo1.prototype, foo2.prototype);
Object.extend(foo1.prototype,
/** @scope foo1 */
{
/**
Method that will be called to start the application
@memberof foo1
*/
start: function(){
}
}
)
----
Regards,
Michael
Original comment by micmath
on 9 Jul 2007 at 8:01
- Changed state: WontFix
- Added labels: Type-Other
- Removed labels: Type-Defect
from jsdoc-toolkit.
Related Issues (20)
- @exports does not export to another symbol's prototype properly HOT 3
- Assignment of a function to a prior declared variable incorrectly considered global HOT 2
- Aliased items are replaced with the first matching exported variable, even if it is not a full match. HOT 1
- Missing semi-colons in TokenReader prevent use of rhino 1.7R3 HOT 1
- Missing semicolon in TokenReader.js, line 17 HOT 1
- Private variables in anonymous function declared as constructor not exported
- Special characters in type expressions are not escaped properly in HTML output
- publishSrcHilite
- Better app/frame/Link.js
- Multiline comment may break the generated doc if it starts with a slash HOT 1
- Notice on front page makes it look like this project is dead. HOT 1
- support: best way to document input objects HOT 1
- removed extra pasted text
- Spelling correction
- Patch for /wiki/TagThrows.wiki
- Getting Started/Introduction missing
- File Index and _global_
- page https://code.google.com/p/jsdoc-toolkit/wiki/TagType does not contain type's descriptions
- can't find way to document code with closure
- uninitialized field documnetation not shown in output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsdoc-toolkit.