-
-
Save schan90/5131a5661b4cd70ec66ad22720cccb71 to your computer and use it in GitHub Desktop.
JsDoc example for CoffeeScript via http://stackoverflow.com/questions/7833021/how-to-document-coffeescript-source-code-with-jsdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### define function variable before block to avoid code being appended to closing part of JSDoc comment ### | |
cube = '' | |
###* | |
* Funtion to calculate cube of input | |
* @param {number} Number to operate on | |
* @return {number} Cube of input | |
### | |
cube = (x) -> x*x*x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* define function variable before block to avoid code being appended to closing part of JSDoc comment */ | |
var cube; | |
cube = ''; | |
/** | |
* Funtion to calculate cube of input | |
* @param {number} Number to operate on | |
* @return {number} Cube of input | |
*/ | |
cube = function(x) { | |
return x * x * x; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment