結果 : typescript conditional return type based on parameter