1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

LibJS: Add the GetOptionsObject & GetOption Temporal AbstractOperations

These are used by any Temporal method that accepts an options object.
This commit is contained in:
Idan Horowitz 2021-07-11 22:28:49 +03:00 committed by Linus Groh
parent 2382f67e0b
commit 01c731aa59
3 changed files with 110 additions and 0 deletions

View file

@ -12,6 +12,14 @@
namespace JS::Temporal {
Object* get_options_object(GlobalObject&, Value options);
enum class OptionType {
Boolean,
String,
Number
};
Value get_option(GlobalObject&, Object& options, String const& property, Vector<OptionType> const& types, Vector<StringView> const& values, Value fallback);
struct ISODateTime {
i32 year;
i32 month;