forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DurationPrototype.h
40 lines (33 loc) · 1.16 KB
/
DurationPrototype.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (c) 2021, Linus Groh <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Runtime/Object.h>
namespace JS::Temporal {
class DurationPrototype final : public Object {
JS_OBJECT(DurationPrototype, Object);
public:
explicit DurationPrototype(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~DurationPrototype() override = default;
private:
JS_DECLARE_NATIVE_FUNCTION(years_getter);
JS_DECLARE_NATIVE_FUNCTION(months_getter);
JS_DECLARE_NATIVE_FUNCTION(weeks_getter);
JS_DECLARE_NATIVE_FUNCTION(days_getter);
JS_DECLARE_NATIVE_FUNCTION(hours_getter);
JS_DECLARE_NATIVE_FUNCTION(minutes_getter);
JS_DECLARE_NATIVE_FUNCTION(seconds_getter);
JS_DECLARE_NATIVE_FUNCTION(milliseconds_getter);
JS_DECLARE_NATIVE_FUNCTION(microseconds_getter);
JS_DECLARE_NATIVE_FUNCTION(nanoseconds_getter);
JS_DECLARE_NATIVE_FUNCTION(sign_getter);
JS_DECLARE_NATIVE_FUNCTION(blank_getter);
JS_DECLARE_NATIVE_FUNCTION(with);
JS_DECLARE_NATIVE_FUNCTION(negated);
JS_DECLARE_NATIVE_FUNCTION(abs);
JS_DECLARE_NATIVE_FUNCTION(value_of);
};
}