Re: [Jsdoc-user] documenting a class?
Status: Inactive
Brought to you by:
mmathews
From: Michael M. <mi...@gm...> - 2007-04-03 06:18:38
|
Hi Kate, The original design for JSDoc wasn't all that clever -- I just copied =20= "how Javadoc does it." Easy for Java programmers to understand but =20 slightly problematic for the rest of us because it abuses the idea of =20= the JavaScript language a bit. As you rightly ask, what is a "class" in JavaScript? JavaScript is a =20 prototype-based language without classes. However, you can think of =20 constructor functions as behaving like classes -- mostly. So =20 essentially any function you intend to invoke with the "new" keyword =20 would be called a "class" by JSDoc. To atone for this sin (it really has been bothering me), I've =20 deprecated the "@class" tag in JSDoc-2 in favor of the "@constructor" =20= tag, which hopefully will better reflect what JavaScript is actually =20 doing. Regards, Michael On 3 Apr 2007, at 02:19, Rodrigues, Kate wrote: > All =96 > > > I was asked by someone in my group if, using JSDoc, I am going to =20 > provide high level descriptions at the top of each =93class=94 page =20= > (similar to the figure below). As I=92ve stated to the group, I am =20 > new to documenting JavaScript, so I=92m not quite sure what =20 > constitutes a =93class=94 in JavaScript. If I=92m documentation for =20= > JavaScript functions, objects, and methods, which is considered the =20= > class? Based on your response, which @ tag do I use within my =20 > JavaScript file to document a class? > > > Thanks a million! > > kate > > > > <image001.jpg> > > <image001.jpg> > ----------------------------------------------------------------------=20= > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > Jsdoc-user mailing list > Jsd...@li... > https://lists.sourceforge.net/lists/listinfo/jsdoc-user |