How do you include dot in names / events / callbacks using jsDoc?

the documentation for name paths says that you should avoid special characters:

The above is an example of a namespace with "fancy" characters in its member names (hash, dash, even quotes). When referencing you just need to specify the names: chat. "# channel", chat. "# channel". "op: announce-motd", etc. Internal quotes in names must be escaped with backslashes: chat "#channel" "say - \" .. Hello \ ""

However, this doesn't work on points. If I have an event named "cellClick.dt" that I want to document, jsDoc skips the documentation from the output and generates an invalid link in the table of contents. I've tried the following combinations:

myClass~event.namespace
'myClass~event.namespace'
myClass~event\.namespace
myclass~'event.namespace'

      

They all generate broken documents in some way. The latter at least seems to generate correct links and documents, but the apostrophes are still present in the output. This makes it very difficult to document code that uses dots for namespace separators in events (like the default jQuery plugins).

What is the correct way to do this? Is it there? The version I am using is 3.3.0-alpha9.

+3


source to share


1 answer


I would suggest doing this:

/**
 * @class
 */
function myClass () {
}

/**
 * @memberof myClass
 * @event event.namespace
 */

      



The event is correctly named and is a member myClass

. It's annoying to have to separate the full name in two parts, but at least the result isn't ugly.

+2


source







All Articles