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:
parent
2382f67e0b
commit
01c731aa59
3 changed files with 110 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue