結果 : typescript generic return type based on parameter