-
Notifications
You must be signed in to change notification settings - Fork 0
/
IHuman.js
66 lines (53 loc) · 989 Bytes
/
IHuman.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* Sample interface to be shared between the client and server.
* Since JS doesn't support interface, used an abstract class instead.
*
* @interface
* @public
*/
export class IHuman {
/**
* @type {string}
*/
name;
/**
* @type {number}
*/
age;
/**
* Define in Kg
* @type {number}
*/
weight;
/**
* Define in meter
* @type {number}
*/
height;
/**
* Calculate the BMI and return it.
*
* @returns {number}
*/
bmi() { }
/**
* Decrease the weight.
*
* @param {number} amount
*/
looseWeight(amount) { }
/**
* Get properties as an array.
* It's not necessary, just to show other supported types.
*
* @returns {Array}
*/
toArray() { }
/**
* Get properties as an object.
* It's not necessary, just to show other supported types.
*
* @returns {object}
*/
toJSON() { }
}