Skip to main content

@implements

Syntax

@implements {InterfaceName}

Overview

@implements documents that a class fulfils the contract of an @interface. Use it alongside @interface to create a formal interface / implementation relationship in the documentation.

Example

/**
* @interface
*/
class Printable {
/** @returns {string} */
toString() {}
}

/**
* @implements {Printable}
*/
class Invoice {
toString() {
return `Invoice #${this.id}`;
}
}

See also

Official reference: jsdoc.app/tags-implements