javascriptdocjsdoc

How to handle dots in event names with @fires in jsdoc


I have an event named namespace.event. The dots are causing issues in JsDoc when I want to use the tag @fires. When I do:

/**
@fires MyClass#namespace.myevent
*/

The result I get is plain text MyClass#namespace:event:myevent. Is there any way to escape dots ? I tried namespace\.event which doesn't work and 'namespace.event' which keeps the dot, but renders with the quotes too.

For information, I found a workaround for the tag @event here: How do you include a dot in names/events/callbacks with jsDoc?. But this does not apply to @fires


Solution

  • At the very bottom it says to quote the name with the special characters. So it should be MyClass#"namespace.myevent"

    https://jsdoc.app/about-namepaths