@@ -520,6 +520,7 @@ export namespace Temporal {
520
520
toLocaleString ( locales ?: string | string [ ] , options ?: Intl . DateTimeFormatOptions ) : string ;
521
521
toJSON ( ) : string ;
522
522
toString ( options ?: ToStringPrecisionOptions ) : string ;
523
+ readonly [ Symbol . toStringTag ] : 'Temporal.Duration' ;
523
524
}
524
525
525
526
/**
@@ -616,6 +617,7 @@ export namespace Temporal {
616
617
toJSON ( ) : string ;
617
618
toString ( options ?: InstantToStringOptions ) : string ;
618
619
valueOf ( ) : never ;
620
+ readonly [ Symbol . toStringTag ] : 'Temporal.Instant' ;
619
621
}
620
622
621
623
export interface CalendarProtocol {
@@ -779,6 +781,7 @@ export namespace Temporal {
779
781
fields ( fields : Iterable < string > ) : Iterable < string > ;
780
782
mergeFields ( fields : Record < string , unknown > , additionalFields : Record < string , unknown > ) : Record < string , unknown > ;
781
783
toString ( ) : string ;
784
+ readonly [ Symbol . toStringTag ] : 'Temporal.Calendar' ;
782
785
}
783
786
784
787
export type PlainDateLike = {
@@ -875,6 +878,7 @@ export namespace Temporal {
875
878
toJSON ( ) : string ;
876
879
toString ( options ?: ShowCalendarOption ) : string ;
877
880
valueOf ( ) : never ;
881
+ readonly [ Symbol . toStringTag ] : 'Temporal.PlainDate' ;
878
882
}
879
883
880
884
export type PlainDateTimeLike = {
@@ -1044,6 +1048,7 @@ export namespace Temporal {
1044
1048
toJSON ( ) : string ;
1045
1049
toString ( options ?: CalendarTypeToStringOptions ) : string ;
1046
1050
valueOf ( ) : never ;
1051
+ readonly [ Symbol . toStringTag ] : 'Temporal.PlainDateTime' ;
1047
1052
}
1048
1053
1049
1054
export type PlainMonthDayLike = {
@@ -1078,6 +1083,7 @@ export namespace Temporal {
1078
1083
toJSON ( ) : string ;
1079
1084
toString ( options ?: ShowCalendarOption ) : string ;
1080
1085
valueOf ( ) : never ;
1086
+ readonly [ Symbol . toStringTag ] : 'Temporal.PlainMonthDay' ;
1081
1087
}
1082
1088
1083
1089
// Temporal.PlainTime's `calendar` field is a Temporal.Calendar, not a
@@ -1215,6 +1221,7 @@ export namespace Temporal {
1215
1221
toJSON ( ) : string ;
1216
1222
toString ( options ?: ToStringPrecisionOptions ) : string ;
1217
1223
valueOf ( ) : never ;
1224
+ readonly [ Symbol . toStringTag ] : 'Temporal.PlainTime' ;
1218
1225
}
1219
1226
1220
1227
/**
@@ -1272,6 +1279,7 @@ export namespace Temporal {
1272
1279
getPossibleInstantsFor ( dateTime : Temporal . PlainDateTime | PlainDateTimeLike | string ) : Temporal . Instant [ ] ;
1273
1280
toString ( ) : string ;
1274
1281
toJSON ( ) : string ;
1282
+ readonly [ Symbol . toStringTag ] : 'Temporal.TimeZone' ;
1275
1283
}
1276
1284
1277
1285
export type PlainYearMonthLike = {
@@ -1329,6 +1337,7 @@ export namespace Temporal {
1329
1337
toJSON ( ) : string ;
1330
1338
toString ( options ?: ShowCalendarOption ) : string ;
1331
1339
valueOf ( ) : never ;
1340
+ readonly [ Symbol . toStringTag ] : 'Temporal.PlainYearMonth' ;
1332
1341
}
1333
1342
1334
1343
export type ZonedDateTimeLike = {
@@ -1492,6 +1501,7 @@ export namespace Temporal {
1492
1501
toJSON ( ) : string ;
1493
1502
toString ( options ?: ZonedDateTimeToStringOptions ) : string ;
1494
1503
valueOf ( ) : never ;
1504
+ readonly [ Symbol . toStringTag ] : 'Temporal.ZonedDateTime' ;
1495
1505
}
1496
1506
1497
1507
/**
@@ -1500,7 +1510,7 @@ export namespace Temporal {
1500
1510
*
1501
1511
* See https://tc39.es/proposal-temporal/docs/now.html for more details.
1502
1512
*/
1503
- export namespace Now {
1513
+ export const Now : {
1504
1514
/**
1505
1515
* Get the exact system date and time as a `Temporal.Instant`.
1506
1516
*
@@ -1513,7 +1523,7 @@ export namespace Temporal {
1513
1523
* exact time in a specific time zone, use `Temporal.Now.zonedDateTimeISO`
1514
1524
* or `Temporal.Now.zonedDateTime`.
1515
1525
* */
1516
- export function instant ( ) : Temporal . Instant ;
1526
+ instant : ( ) => Temporal . Instant ;
1517
1527
1518
1528
/**
1519
1529
* Get the current calendar date and clock time in a specific calendar and
@@ -1533,10 +1543,7 @@ export namespace Temporal {
1533
1543
* object implementing the time zone protocol. If omitted, the environment's
1534
1544
* current time zone will be used.
1535
1545
*/
1536
- export function zonedDateTime (
1537
- calendar : CalendarProtocol | string ,
1538
- tzLike ?: TimeZoneProtocol | string
1539
- ) : Temporal . ZonedDateTime ;
1546
+ zonedDateTime : ( calendar : CalendarProtocol | string , tzLike ?: TimeZoneProtocol | string ) => Temporal . ZonedDateTime ;
1540
1547
1541
1548
/**
1542
1549
* Get the current calendar date and clock time in a specific time zone,
@@ -1548,7 +1555,7 @@ export namespace Temporal {
1548
1555
* object implementing the time zone protocol. If omitted, the environment's
1549
1556
* current time zone will be used.
1550
1557
*/
1551
- export function zonedDateTimeISO ( tzLike ?: TimeZoneProtocol | string ) : Temporal . ZonedDateTime ;
1558
+ zonedDateTimeISO : ( tzLike ?: TimeZoneProtocol | string ) => Temporal . ZonedDateTime ;
1552
1559
1553
1560
/**
1554
1561
* Get the current calendar date and clock time in a specific calendar and
@@ -1573,10 +1580,7 @@ export namespace Temporal {
1573
1580
* object implementing the time zone protocol. If omitted,
1574
1581
* the environment's current time zone will be used.
1575
1582
*/
1576
- export function plainDateTime (
1577
- calendar : CalendarProtocol | string ,
1578
- tzLike ?: TimeZoneProtocol | string
1579
- ) : Temporal . PlainDateTime ;
1583
+ plainDateTime : ( calendar : CalendarProtocol | string , tzLike ?: TimeZoneProtocol | string ) => Temporal . PlainDateTime ;
1580
1584
1581
1585
/**
1582
1586
* Get the current date and clock time in a specific time zone, using the
@@ -1593,7 +1597,7 @@ export namespace Temporal {
1593
1597
* object implementing the time zone protocol. If omitted, the environment's
1594
1598
* current time zone will be used.
1595
1599
*/
1596
- export function plainDateTimeISO ( tzLike ?: TimeZoneProtocol | string ) : Temporal . PlainDateTime ;
1600
+ plainDateTimeISO : ( tzLike ?: TimeZoneProtocol | string ) => Temporal . PlainDateTime ;
1597
1601
1598
1602
/**
1599
1603
* Get the current calendar date in a specific calendar and time zone.
@@ -1611,10 +1615,7 @@ export namespace Temporal {
1611
1615
* object implementing the time zone protocol. If omitted,
1612
1616
* the environment's current time zone will be used.
1613
1617
*/
1614
- export function plainDate (
1615
- calendar : CalendarProtocol | string ,
1616
- tzLike ?: TimeZoneProtocol | string
1617
- ) : Temporal . PlainDate ;
1618
+ plainDate : ( calendar : CalendarProtocol | string , tzLike ?: TimeZoneProtocol | string ) => Temporal . PlainDate ;
1618
1619
1619
1620
/**
1620
1621
* Get the current date in a specific time zone, using the ISO 8601
@@ -1626,7 +1627,7 @@ export namespace Temporal {
1626
1627
* object implementing the time zone protocol. If omitted, the environment's
1627
1628
* current time zone will be used.
1628
1629
*/
1629
- export function plainDateISO ( tzLike ?: TimeZoneProtocol | string ) : Temporal . PlainDate ;
1630
+ plainDateISO : ( tzLike ?: TimeZoneProtocol | string ) => Temporal . PlainDate ;
1630
1631
1631
1632
/**
1632
1633
* Get the current clock time in a specific time zone, using the ISO 8601 calendar.
@@ -1637,7 +1638,7 @@ export namespace Temporal {
1637
1638
* object implementing the time zone protocol. If omitted, the environment's
1638
1639
* current time zone will be used.
1639
1640
*/
1640
- export function plainTimeISO ( tzLike ?: TimeZoneProtocol | string ) : Temporal . PlainTime ;
1641
+ plainTimeISO : ( tzLike ?: TimeZoneProtocol | string ) => Temporal . PlainTime ;
1641
1642
1642
1643
/**
1643
1644
* Get the environment's current time zone.
@@ -1646,8 +1647,10 @@ export namespace Temporal {
1646
1647
* named
1647
1648
* {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones|IANA time zone}.
1648
1649
*/
1649
- export function timeZone ( ) : Temporal . TimeZone ;
1650
- }
1650
+ timeZone : ( ) => Temporal . TimeZone ;
1651
+
1652
+ readonly [ Symbol . toStringTag ] : 'Temporal.Now' ;
1653
+ } ;
1651
1654
}
1652
1655
1653
1656
declare namespace IntlPolyfill {
0 commit comments