1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibJS: Convert Intl::get_option() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-18 19:31:17 +03:00
parent 3758e65293
commit de9785b71b
6 changed files with 42 additions and 70 deletions

View file

@ -46,7 +46,7 @@ Vector<String> lookup_supported_locales(Vector<String> const& requested_locales)
Vector<String> best_fit_supported_locales(Vector<String> const& requested_locales);
Array* supported_locales(GlobalObject&, Vector<String> const& requested_locales, Value options);
Object* coerce_options_to_object(GlobalObject& global_object, Value options);
Value get_option(GlobalObject& global_object, Object const& options, PropertyName const& property, Value::Type type, Vector<StringView> const& values, Fallback fallback);
ThrowCompletionOr<Value> get_option(GlobalObject& global_object, Object const& options, PropertyName const& property, Value::Type type, Vector<StringView> const& values, Fallback fallback);
Optional<int> default_number_option(GlobalObject& global_object, Value value, int minimum, int maximum, Optional<int> fallback);
Optional<int> get_number_option(GlobalObject& global_object, Object const& options, PropertyName const& property, int minimum, int maximum, Optional<int> fallback);
Vector<PatternPartition> partition_pattern(StringView pattern);