Skip to content

Instantly share code, notes, and snippets.

@Kuniwak
Last active December 21, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kuniwak/6282048 to your computer and use it in GitHub Desktop.
Save Kuniwak/6282048 to your computer and use it in GitHub Desktop.
Jsdoc3でjQueryプラグインをアノテーションする。
(function($) {
/**
* @constructor
* @alias Foo
*/
var Foo = function() {
};
/**
* Description.
*/
Foo.prototype.foo = function() {
// ...
};
/**
* @constructor
* @alias Bar
*/
var Bar = function() {
};
/**
* Description.
*/
Bar.prototype.bar = function() {
// ...
};
})(jQuery);
@Kuniwak
Copy link
Author

Kuniwak commented Aug 20, 2013

@alias がポイント。

これを書くとグローバルオブジェクトがエイリアスとして張られるので、うまくドキュメンテーションされる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment