Skip to content

Commit 27b4c7e

Browse files
authored
TS: PlainMD/YM constructors calendar type (#70)
The `calendar` parameter in Temporal constructors accepts a string as well as a CalendarProtocol. This PR updates the remaining types where `string` was previously missing.
1 parent 3a09d00 commit 27b4c7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ export namespace Temporal {
10711071
item: Temporal.PlainMonthDay | PlainMonthDayLike | string,
10721072
options?: AssignmentOptions
10731073
): Temporal.PlainMonthDay;
1074-
constructor(isoMonth: number, isoDay: number, calendar?: CalendarProtocol, referenceISOYear?: number);
1074+
constructor(isoMonth: number, isoDay: number, calendar?: CalendarProtocol | string, referenceISOYear?: number);
10751075
readonly monthCode: string;
10761076
readonly day: number;
10771077
readonly calendar: CalendarProtocol;
@@ -1305,7 +1305,7 @@ export namespace Temporal {
13051305
one: Temporal.PlainYearMonth | PlainYearMonthLike | string,
13061306
two: Temporal.PlainYearMonth | PlainYearMonthLike | string
13071307
): ComparisonResult;
1308-
constructor(isoYear: number, isoMonth: number, calendar?: CalendarProtocol, referenceISODay?: number);
1308+
constructor(isoYear: number, isoMonth: number, calendar?: CalendarProtocol | string, referenceISODay?: number);
13091309
readonly era: string | undefined;
13101310
readonly eraYear: number | undefined;
13111311
readonly year: number;

0 commit comments

Comments
 (0)