@use JSDoc

構文

@this<namePath>

概要

@this タグは、別のシンボル内で使用されるときに this キーワードが参照するものを示します。

次の例では、@this タグにより「this.name」がグローバルシンボル「name」ではなく「Greeter#name」としてドキュメント化されます。

/** @constructor */
function Greeter(name) {
    setName.apply(this, name);
}

/** @this Greeter */
function setName(name) {
    /** document me */
    this.name = name;
}