=> num * num; const divide = (a: number, b: number) => a / b; const bmi = (h: number, w: number) => divide(w, square(h / 100)); const bmiPerson = (p: Person) => bmi(p.height, p.weight); class Person { height: number; weight: number; constructor(h: number, w: number) { /* 略 */ } getBMI() { return bmiPerson(this); } } let john = new Person(180, 80); console.log(john.getBMI()); // 24.691...