結果 : typescript create a generic function