結果 : how to make generic function in typescript