Merge pull request #33154 from kmontag/patch-1

[@types/luxon] Add possible null interval intersection result
This commit is contained in:
Andrew Casey
2019-02-19 17:39:06 -08:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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;
+1
View File
@@ -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