結果 : how to create generic function in typescript