1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 20:35:06 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Temporal/InstantConstructor.h
Linus Groh 47fb4286c7 LibJS: Start implementing Temporal.Instant
Just like the initial Temporal.TimeZone commit, this patch adds the
Instant object itself, its constructor and prototype (currently empty),
and two required abstract operations.
2021-07-07 19:00:42 +01:00

28 lines
650 B
C++

/*
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/NativeFunction.h>
namespace JS::Temporal {
class InstantConstructor final : public NativeFunction {
JS_OBJECT(InstantConstructor, NativeFunction);
public:
explicit InstantConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~InstantConstructor() override = default;
virtual Value call() override;
virtual Value construct(FunctionObject& new_target) override;
private:
virtual bool has_constructor() const override { return true; }
};
}