pickaday: add explicit null types to match usage for setStartRange, setDate and setEndRange

This commit is contained in:
carl-coolblue
2019-02-11 15:49:05 +01:00
parent 363cdf403a
commit 5b1aa827d2
+3 -3
View File
@@ -44,7 +44,7 @@ declare class Pikaday {
* can optionally be passed as the second parameter to prevent triggering
* of the onSelect callback, allowing the date to be set silently.
*/
setDate(date: string | Date, preventOnSelect?: boolean): void;
setDate(date: string | Date | null, preventOnSelect?: boolean): void;
/**
* Returns a Moment.js object for the selected date (Moment must be
@@ -101,13 +101,13 @@ declare class Pikaday {
* Update the range start date. For using two Pikaday instances to
* select a date range.
*/
setStartRange(date: Date): void;
setStartRange(date: Date | null): void;
/**
* Update the range end date. For using two Pikaday instances to select
* a date range.
*/
setEndRange(date: Date): void;
setEndRange(date: Date | null): void;
/**
* Update the HTML.