javascriptgoogle-closure-compilergoogle-closure-library

What does @code mean in Google Closure?


An example is here:

* An implementation of {@code goog.events.Listenable} with full W3C
* EventTarget-like support (capture/bubble mechanism,

https://developer.pubref.org/static/apidoc/global/closure/goog/events/EventTarget.html

I can guess what it means but where can I find its exact definition? I checked all the Google Closure Annotation docs but couldn't find. Thanks :)


Solution

  • Updated

    Per my new understanding; Since JSDocs supports markdown. {@code FooBar} is therefore deprecated in favor of back-ticks `FooBar`.

    Old

    You can see the output of the docs you've asked about on the Closure API's documentation page for goog.events.EventTarget.

    When the JSDocs are rendered the @code tag will cause the code with in brackets to be rendered with as a <code></code> element.

    Source: js-dossier

    There's also the much better documentation from the JavaDocs... docs:

    {@code text}

    Source: docs.oracle.com