From cc06c0bd237623a251bbd41fe4696321533e7a3b Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 28 Mar 2018 11:13:16 -0700 Subject: [PATCH] Update react-flatpickr with flatpickr's new exports It switched to a default export that contains nested-nested types. --- types/react-flatpickr/index.d.ts | 6 +++--- types/react-flatpickr/react-flatpickr-tests.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 68d79a2b6c..9683835e32 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -5,12 +5,12 @@ // TypeScript Version: 2.6 import { Component } from 'react'; -import { Options } from 'flatpickr'; +import flatpickr from 'flatpickr'; export interface DateTimePickerProps { defaultValue?: string; - options?: Options.Options; - onChange?: Options.Hook; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; value?: string; } diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index c3dc0f4adc..fbbb6f45a7 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -1,4 +1,4 @@ -import { Instance } from 'flatpickr'; +import flatpickr from 'flatpickr'; import * as React from 'react'; import DatePicker from 'react-flatpickr'; @@ -12,7 +12,7 @@ const options = { const optionsElement = ; const onChange = ( - selectedDates: Date[], dateStr: string, instance: Instance, + selectedDates: Date[], dateStr: string, instance: flatpickr.Instance, elem: HTMLElement ) => null; const onChangeElement = ;