Skip to content

Commit 0ee4581

Browse files
justingrantptomato
authored andcommitted
Fix TS types for required CalendarProtocol methods
Port of tc39/proposal-temporal#1964
1 parent 08346dc commit 0ee4581

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -631,20 +631,20 @@ export namespace Temporal {
631631
day(date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainMonthDay | PlainDateLike | string): number;
632632
era(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): string | undefined;
633633
eraYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number | undefined;
634-
dayOfWeek?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
635-
dayOfYear?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
636-
weekOfYear?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
637-
daysInWeek?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
638-
daysInMonth?(
634+
dayOfWeek(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
635+
dayOfYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
636+
weekOfYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
637+
daysInWeek(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
638+
daysInMonth(
639639
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
640640
): number;
641-
daysInYear?(
641+
daysInYear(
642642
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
643643
): number;
644-
monthsInYear?(
644+
monthsInYear(
645645
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
646646
): number;
647-
inLeapYear?(
647+
inLeapYear(
648648
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
649649
): boolean;
650650
dateFromFields(
@@ -659,12 +659,12 @@ export namespace Temporal {
659659
fields: EitherMonthCodeOrMonthAndYear & { day: number },
660660
options?: AssignmentOptions
661661
): Temporal.PlainMonthDay;
662-
dateAdd?(
662+
dateAdd(
663663
date: Temporal.PlainDate | PlainDateLike | string,
664664
duration: Temporal.Duration | DurationLike | string,
665665
options?: ArithmeticOptions
666666
): Temporal.PlainDate;
667-
dateUntil?(
667+
dateUntil(
668668
one: Temporal.PlainDate | PlainDateLike | string,
669669
two: Temporal.PlainDate | PlainDateLike | string,
670670
options?: DifferenceOptions<'year' | 'month' | 'week' | 'day'>

0 commit comments

Comments
 (0)