1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 04:14:58 +00:00
serenity/Userland/Libraries/LibJS/Runtime/Temporal/PlainTimeConstructor.h
Linus Groh ae4bf8fc32 LibJS: Start implementing Temporal.PlainTime
This commit adds the PlainTime object itself, its constructor and
prototype (currently empty), and the CreateTemporalTime abstract
operation.
2021-07-28 21:57:30 +01:00

28 lines
658 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 PlainTimeConstructor final : public NativeFunction {
JS_OBJECT(PlainTimeConstructor, NativeFunction);
public:
explicit PlainTimeConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~PlainTimeConstructor() override = default;
virtual Value call() override;
virtual Value construct(FunctionObject& new_target) override;
private:
virtual bool has_constructor() const override { return true; }
};
}