chris_bの答えは、私のサンプルと同様にリンクをたくさん助け。しかし、@class
注釈を削除する必要がありました。そうしないと、クラスの2つのエントリが生成されました。さらに、この回答を追加して、静的クラスメンバー(クラスレベル定数)に注釈を付ける方法を示します。
は(我々はrequire.jsを使用しています。)
define([
'jquery', 'lodash', 'backbone'
], function($, _, Backbone) {
"use strict";
/**
* Enumeration of constants that represent the different types of Hedgehogs.
* @memberof models/Hedgehog
* @enum {string}
* @readonly
*/
var types = { 'type1': 'Type 1', 'type2': 'Type 2' };
var Hedgehog = Backbone.Model.extend(
/** @lends models/Hedgehog.prototype */
{
/**
* This is the model for Hedgehogs.
*
* @augments external:Backbone.Model
* @constructs
*/
initialize: function() {
// your code
},
// some more methods
}, {
// static class members
"types": types
});
return Hedgehog;
});
JSDocのはJavaDocでのポートなので。したがって、JavaScript用に設計されていません。 ['docco'](http://jashkenas.github.com/docco/) – Raynos
のポートまたはその一部を使用しますか? – XMen
@Raynos一般的には正しいですが、JSDocにはまだ大きな利点があります。IDEでオートコンプリートを与えることができます。 –