Skip to content

Commit b8ddad7

Browse files
justingrantptomato
authored andcommitted
Typing for one-arg PlainDate.p.toZonedDateTime()
The TS types file is missing the single-arg overload for `PlainDate.prototype.toZonedDateTime`. Examples of code for this overload: Temporal.Now.plainDateISO().toZonedDateTime(Temporal.Now.timeZone()); Temporal.Now.plainDateISO().toZonedDateTime('Asia/Tokyo');
1 parent f1d19e0 commit b8ddad7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

index.d.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,10 +857,15 @@ export namespace Temporal {
857857
>
858858
): Temporal.Duration;
859859
toPlainDateTime(temporalTime?: Temporal.PlainTime | TimeLike | string): Temporal.PlainDateTime;
860-
toZonedDateTime(timeZoneAndTime: {
861-
timeZone: TimeZoneProtocol | string;
862-
plainTime?: Temporal.PlainTime | TimeLike | string;
863-
}): Temporal.ZonedDateTime;
860+
toZonedDateTime(
861+
timeZoneAndTime:
862+
| TimeZoneProtocol
863+
| string
864+
| {
865+
timeZone: TimeZoneProtocol | string;
866+
plainTime?: Temporal.PlainTime | TimeLike | string;
867+
}
868+
): Temporal.ZonedDateTime;
864869
toPlainYearMonth(): Temporal.PlainYearMonth;
865870
toPlainMonthDay(): Temporal.PlainMonthDay;
866871
getISOFields(): DateISOFields;

0 commit comments

Comments
 (0)