結果 : typescript generic function return type based on parameter