1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:57:46 +00:00

LibJS: Make JS::number_to_string() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-09 08:03:12 +02:00
parent 09547ec975
commit b8f78c0adc
9 changed files with 66 additions and 68 deletions

View file

@ -561,8 +561,8 @@ enum class NumberToStringMode {
WithExponent,
WithoutExponent,
};
ErrorOr<String> number_to_string(double, NumberToStringMode = NumberToStringMode::WithExponent);
DeprecatedString number_to_deprecated_string(double, NumberToStringMode = NumberToStringMode::WithExponent);
[[nodiscard]] String number_to_string(double, NumberToStringMode = NumberToStringMode::WithExponent);
[[nodiscard]] DeprecatedString number_to_deprecated_string(double, NumberToStringMode = NumberToStringMode::WithExponent);
double string_to_number(StringView);
inline bool Value::operator==(Value const& value) const { return same_value(*this, value); }