Skip to content

Instantly share code, notes, and snippets.

@KiT106
Created May 26, 2016 06:53
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 KiT106/38e470acc0e972542813e68a911d1c8d to your computer and use it in GitHub Desktop.
Save KiT106/38e470acc0e972542813e68a911d1c8d to your computer and use it in GitHub Desktop.
/**
* @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