Skip to main content

@instance

Syntax

@instance

Overview

@instance marks a symbol as belonging to an instance of the class, rather than to the class itself. Instance members use # in their namepath: ClassName#memberName.

Example

/** @class */
function Dog(name) {
/**
* The dog's name.
* @instance
* @type {string}
*/
this.name = name;
}

The namepath for name is Dog#name.

See also

Official reference: jsdoc.app/tags-instance