diff --git a/types/luxon/index.d.ts b/types/luxon/index.d.ts index 8d5b17d697..16e669ef19 100644 --- a/types/luxon/index.d.ts +++ b/types/luxon/index.d.ts @@ -4,6 +4,7 @@ // Hyeonseok Yang // Jonathan Siebern // Matt R. Wilson +// Pietro Vismara // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -196,6 +197,7 @@ declare module 'luxon' { weeksInWeekYear: number; year: number; zoneName: string; + zone: Zone; diff( other: DateTime, unit?: DurationUnit | DurationUnit[], @@ -393,6 +395,7 @@ declare module 'luxon' { toISO(options?: ISOTimeOptions): string; toString(): string; union(other: Interval): Interval; + mapEndpoints(cb: (d: DateTime) => DateTime): Interval } namespace Settings { diff --git a/types/luxon/luxon-tests.ts b/types/luxon/luxon-tests.ts index 587210815c..6e073776e0 100644 --- a/types/luxon/luxon-tests.ts +++ b/types/luxon/luxon-tests.ts @@ -49,6 +49,8 @@ dt.plus({ hours: 3, minutes: 2 }); dt.minus({ days: 7 }); dt.startOf('day'); dt.endOf('hour'); +dt.zone; +dt.zoneName; dt.set({ hour: 3 }).hour; @@ -87,6 +89,7 @@ i.length(); i.length('years'); i.contains(DateTime.local(2019)); i.set({end: DateTime.local(2020)}); +i.mapEndpoints((d) => d); i.toISO(); i.toString();