mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #32888 from pf-siedler/fix-luxon-interval-toDuration
[@types/luxon] Fix args type for Interval#toDuration
This commit is contained in:
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for luxon 1.10
|
||||
// Type definitions for luxon 1.11
|
||||
// Project: https://github.com/moment/luxon#readme
|
||||
// Definitions by: Colby DeHart <https://github.com/colbydehart>
|
||||
// Hyeonseok Yang <https://github.com/FourwingsY>
|
||||
@@ -436,7 +436,7 @@ export class Interval {
|
||||
splitAt(...dateTimes: DateTime[]): Interval[];
|
||||
splitBy(duration: Duration | DurationObject | number): Interval[];
|
||||
toDuration(
|
||||
unit: DurationUnit | DurationUnit[],
|
||||
unit?: DurationUnit | DurationUnit[],
|
||||
options?: DiffOptions
|
||||
): Duration;
|
||||
toFormat(
|
||||
|
||||
@@ -144,6 +144,7 @@ i.mapEndpoints((d) => d); // $ExpectType Interval
|
||||
i.toISO(); // $ExpectType string
|
||||
i.toString(); // $ExpectType string
|
||||
i.toDuration('months'); // $ExpectType Duration
|
||||
i.toDuration(); // $ExpectType Duration
|
||||
|
||||
if (Interval.isInterval(anything)) {
|
||||
anything; // $ExpectType Interval
|
||||
|
||||
Reference in New Issue
Block a user