1
1
import type { ComponentPublicInstance , Ref } from 'vue' ;
2
2
import type { HeaderPicker } from '@/constants' ;
3
+ import DatepickerMenu from '@/components/DatepickerMenu.vue' ;
4
+ import type DatepickerInput from '@/components/DatepickerInput.vue' ;
3
5
4
6
export type DynamicClass = Record < string , boolean | undefined > ;
5
7
@@ -85,7 +87,9 @@ export interface ConfigurableWindow {
85
87
window ?: Window ;
86
88
}
87
89
88
- export type MaybeElementRef = MaybeRef < HTMLElement | SVGElement | ComponentPublicInstance | undefined | null | Element > ;
90
+ export type MaybeElementRef = MaybeRef <
91
+ HTMLElement | SVGElement | ComponentPublicInstance | undefined | null | Element | any
92
+ > ;
89
93
export type OnClickOutsideEvents = Pick <
90
94
WindowEventMap ,
91
95
'click' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchend' | 'pointerdown' | 'pointerup'
@@ -172,8 +176,6 @@ export interface ICalendarData {
172
176
year : number ;
173
177
}
174
178
175
- export type ComponentRef = Ref < ComponentPublicInstance | HTMLElement | null > ;
176
-
177
179
export type TimeOverlayCheck = 'noHoursOverlay' | 'noMinutesOverlay' | 'noSecondsOverlay' ;
178
180
179
181
export type DateTimeSetter = number | string | null ;
@@ -189,15 +191,9 @@ export interface MonthYearOpt {
189
191
year ?: number | string ;
190
192
}
191
193
192
- export type DatepickerMenuRef = ComponentPublicInstance < {
193
- updateMonthYear : ( ins : number , val : { month : number | null ; year : number | null } ) => void ;
194
- switchView : ( view : MenuView , instance ?: number ) => void ;
195
- } > ;
194
+ export type DatepickerMenuRef = InstanceType < typeof DatepickerMenu > ;
196
195
197
- export type DatepickerInputRef = ComponentPublicInstance < {
198
- setParsedDate : ( date : Date | Date [ ] | null ) => void ;
199
- focusInput : ( ) => void ;
200
- } > ;
196
+ export type DatepickerInputRef = InstanceType < typeof DatepickerInput > ;
201
197
202
198
export interface ActionRowData {
203
199
showSelect : boolean ;
0 commit comments