[Jsdoc-user] adding code sample/snippet to jsdoc
Status: Inactive
Brought to you by:
mmathews
|
From: Rodrigues, K. <kro...@ne...> - 2007-03-01 23:07:19
|
Hi there -
=20
In my JavaScript file, is there a javadoc tag I can use to set off a
small, illustrative code snippet? Is there anything like an @example tag
I can put in front of the code snippet to set the sample code apart from
the function description? Also, bordering the code sample do I need to
have <code></code> tags so that the text will appear in code format?
=20
For example:
=20
/**Initializes a new record and returns an nlobjRecord containing all
the default field data for that record type
*@param type record type for the record
*@example the following example initializes a new opportunity record
*<code>var record =3D nlapiCreateRecord('opportunity')</code>
*<code>var defaultstatus =3D record.getFieldValue('entitystatus')</code>
*/
function nlapiCreateRecord(type) { ; } =20
=20
=20
Many of the developers around here like the output of JSDoc, but they
want the output to capture a lot of things I just don't know how to add
yet, like code samples imbedded/commented within the code.=20
=20
Thanks!
kate
|