結果 : method vs function typescript