Skip to content

Commit

Permalink
Fix TS types for required CalendarProtocol methods
Browse files Browse the repository at this point in the history
The docs state that all CalendarProtocol methods are required to be
implemented except `id`, `fields()`, `mergeFields()`, and `toJSON()`.
This PR aligns the TS types to the docs.
  • Loading branch information
justingrant committed Dec 8, 2021
1 parent f2405e1 commit 55db928
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions polyfill/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,20 +631,20 @@ export namespace Temporal {
day(date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainMonthDay | PlainDateLike | string): number;
era(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): string | undefined;
eraYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number | undefined;
dayOfWeek?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
dayOfYear?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
weekOfYear?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
daysInWeek?(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
daysInMonth?(
dayOfWeek(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
dayOfYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
weekOfYear(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
daysInWeek(date: Temporal.PlainDate | Temporal.PlainDateTime | PlainDateLike | string): number;
daysInMonth(
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
): number;
daysInYear?(
daysInYear(
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
): number;
monthsInYear?(
monthsInYear(
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
): number;
inLeapYear?(
inLeapYear(
date: Temporal.PlainDate | Temporal.PlainDateTime | Temporal.PlainYearMonth | PlainDateLike | string
): boolean;
dateFromFields(
Expand All @@ -659,12 +659,12 @@ export namespace Temporal {
fields: EitherMonthCodeOrMonthAndYear & { day: number },
options?: AssignmentOptions
): Temporal.PlainMonthDay;
dateAdd?(
dateAdd(
date: Temporal.PlainDate | PlainDateLike | string,
duration: Temporal.Duration | DurationLike | string,
options?: ArithmeticOptions
): Temporal.PlainDate;
dateUntil?(
dateUntil(
one: Temporal.PlainDate | PlainDateLike | string,
two: Temporal.PlainDate | PlainDateLike | string,
options?: DifferenceOptions<'year' | 'month' | 'week' | 'day'>
Expand Down

0 comments on commit 55db928

Please sign in to comment.