Skip to content

Instantly share code, notes, and snippets.

@devinrhode2
Created February 17, 2012 02:02
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 devinrhode2/1849800 to your computer and use it in GitHub Desktop.
Save devinrhode2/1849800 to your computer and use it in GitHub Desktop.
sample jsdoc annotations pulled from some of google's sample chrome extensions
Ripped apart jsDoc stuff from http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
Here's the best stuff you should know about:
/**
* @license MIT style, use however you wish.
* @fileoverview Some utilities.
* @author devinrhode2@gmail.com (Devin Rhode)
*/
/**
* Gets you a pile of work done.
* @param {string} foo This is a param with a description too long to fit in
* one line.
* @return {number} This returns something that has a description too long to
* fit in one line.
*/
project.MyClass.prototype.method = function(foo) {
return 5;
};
Property Comments:
/**
* Maximum number of things per pane.
* @type {number}
*/
var someProperty = 4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment