Guest User

Untitled

a guest
Jan 17th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. export default class Tower {
  2. /**
  3. * @param {string} title
  4. * @param {string} code
  5. * @param {string=} img - '=' sign to distinguish optional parameters
  6. * @param {{offices: {number}, apartments: {number}}=} rent
  7. * @param {{offices: {number}, apartments: {number}}=} sale
  8. * @param {Array<{trait: {string}, value: {string}}>=} traits
  9. */
  10. constructor({
  11. title,
  12. code,
  13. img = '',
  14. rent = {
  15. offices: 0,
  16. apartments: 0
  17. },
  18. sale = {
  19. offices: 0,
  20. apartments: 0
  21. },
  22. traits = [{trait: 'one', value: 'first'}, {trait: 'two', value: 'second'],
  23. }) {
  24. // code here
  25. }
  26. }
Add Comment
Please, Sign In to add comment