1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

LibJS: Use more specific return types for some Temporal AOs

Instead of returning Object* we should be specific and return Instant*,
TimeZone* etc.
This commit is contained in:
Linus Groh 2021-07-14 20:52:15 +01:00
parent be475cd6a8
commit 6c8f0fbb35
4 changed files with 6 additions and 6 deletions

View file

@ -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);