Guest User

Untitled

a guest
Jan 13th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Created by xxx on 1/13/17.
  3.  */
  4. /**
  5.  *  @class Bear
  6.  *  @type {Object}
  7.  *  @property {string} biomass
  8.  *  @return {Bear}
  9.  */
  10. function bear(biomass) {
  11.     /**
  12.      * Feeds the bear
  13.      * @param {Object} food
  14.      * @param {string} food.fish
  15.      * @return {boolean} Is the bear still hungry?
  16.      */
  17.     this.prototype.eat = function (food) {}
  18. }
  19.  
  20. /**
  21.  *  @class Human
  22.  *  @type {Object}
  23.  *  @property {string} biomass
  24.  *  @return {Human}
  25.  */
  26. function human(biomass) {
  27.     /**
  28.      * Feeds the human
  29.      * @param {Object} food
  30.      * @param {string} food.pasta
  31.      * @return {boolean} Is the human still hungry?
  32.      */
  33.     this.prototype.eat = function (food) {}
  34. }
  35.  
  36. var bear = bear('biomass');
  37. bear.eat({
  38.     //<Invoking auto complete here gives both fish and pasta as an option but should only give fish as an option..
  39. })
Advertisement
Add Comment
Please, Sign In to add comment