diff --git a/types/luxon/index.d.ts b/types/luxon/index.d.ts index 3ace54ca0a..dc7eebe5d0 100644 --- a/types/luxon/index.d.ts +++ b/types/luxon/index.d.ts @@ -1,9 +1,10 @@ -// Type definitions for luxon 1.4 +// Type definitions for luxon 1.10 // Project: https://github.com/moment/luxon#readme // Definitions by: Colby DeHart // Hyeonseok Yang // Jonathan Siebern // Matt R. Wilson +// Pietro Vismara // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -225,6 +226,7 @@ declare module 'luxon' { weeksInWeekYear: number; year: number; zoneName: string; + zone: Zone; diff( other: DateTime, unit?: DurationUnit | DurationUnit[], @@ -424,6 +426,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 133b220cb2..302ddded8b 100644 --- a/types/luxon/luxon-tests.ts +++ b/types/luxon/luxon-tests.ts @@ -71,6 +71,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; @@ -109,6 +111,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();