diff options
author | Linus Groh <mail@linusgroh.de> | 2021-07-14 20:52:15 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-07-14 23:50:03 +0100 |
commit | 6c8f0fbb35fa97e6314235a5088e1faa39f73c35 (patch) | |
tree | 25b6510be6c427394b3e773d65a588b3a768482a /Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp | |
parent | be475cd6a832274fd7389747f98d46b78da22c9c (diff) | |
download | serenity-6c8f0fbb35fa97e6314235a5088e1faa39f73c35.zip |
LibJS: Use more specific return types for some Temporal AOs
Instead of returning Object* we should be specific and return Instant*,
TimeZone* etc.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp index 3c2e3a8eb4..043af0cafd 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Now.cpp @@ -45,7 +45,7 @@ JS_DEFINE_NATIVE_FUNCTION(Now::instant) } // 2.2.1 SystemTimeZone ( ), https://tc39.es/proposal-temporal/#sec-temporal-systemtimezone -Object* system_time_zone(GlobalObject& global_object) +TimeZone* system_time_zone(GlobalObject& global_object) { // 1. Let identifier be ! DefaultTimeZone(). auto identifier = default_time_zone(); @@ -78,7 +78,7 @@ BigInt* system_utc_epoch_nanoseconds(GlobalObject& global_object) } // 2.2.3 SystemInstant ( ) -Object* system_instant(GlobalObject& global_object) +Instant* system_instant(GlobalObject& global_object) { // 1. Let ns be ! SystemUTCEpochNanoseconds(). auto* ns = system_utc_epoch_nanoseconds(global_object); |