結果 : typescript return value based on parameter