mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #33154 from kmontag/patch-1
[@types/luxon] Add possible null interval intersection result
This commit is contained in:
Vendored
+1
-1
@@ -426,7 +426,7 @@ export class Interval {
|
||||
engulfs(other: Interval): boolean;
|
||||
equals(other: Interval): boolean;
|
||||
hasSame(unit: DurationUnit): boolean;
|
||||
intersection(other: Interval): Interval;
|
||||
intersection(other: Interval): Interval | null;
|
||||
isAfter(dateTime: DateTime): boolean;
|
||||
isBefore(dateTime: DateTime): boolean;
|
||||
isEmpty(): boolean;
|
||||
|
||||
@@ -140,6 +140,7 @@ i.length('years'); // $ExpectType number
|
||||
i.contains(DateTime.local(2019)); // $ExpectType boolean
|
||||
i.set({end: DateTime.local(2020)}); // $ExpectType Interval
|
||||
i.mapEndpoints((d) => d); // $ExpectType Interval
|
||||
i.intersection(i); // $ExpectType Interval | null
|
||||
|
||||
i.toISO(); // $ExpectType string
|
||||
i.toString(); // $ExpectType string
|
||||
|
||||
Reference in New Issue
Block a user