Skip to main content

@mixes

Syntax

@mixes MixinName

Overview

@mixes documents that a class or object incorporates all members of a @mixin. Use it on the receiving class to create an explicit link in the documentation.

Example

/**
* @mixin
*/
const Emitter = {
/** @param {string} event */
on(event, listener) {},
/** @param {string} event */
emit(event, ...args) {},
};

/**
* @mixes Emitter
*/
class Store {}
Object.assign(Store.prototype, Emitter);

See also

Official reference: jsdoc.app/tags-mixes