Created
May 26, 2016 06:53
-
-
Save KiT106/38e470acc0e972542813e68a911d1c8d to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* @file A sample file demo about JSDoc | |
* @author dungdm93 | |
* @since 2016-05-26 | |
*/ | |
/** | |
* Person entity class | |
* @class | |
*/ | |
var Person = (function () { | |
/** | |
* @param {string} name person name | |
* @param {number} [age] person age | |
* @param {string} [address=""] person address | |
* @constructor | |
*/ | |
function Person(name, age, address) { | |
this.name = name; | |
this.age = age; | |
this.address = address || ""; | |
} | |
/** | |
* @param {string} name Single type | |
* @param {string|number} idCode Multiple types | |
* @param {Person[]} friends Arrays of a type | |
* @exception {InvalidArgumentException} if idCode dose not exists | |
* @returns {string} | |
* @since ASM#### | |
*/ | |
Person.prototype.foo = function (name, idCode, friends) { | |
// do some staff | |
return "Hello, I'm " + this.name; | |
}; | |
return Person; | |
}()); | |
/** | |
* Enum gender | |
* @readonly | |
* @enum {number} | |
*/ | |
var Gender = { | |
MALE: 0, | |
FEMALE: 1 | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment