diff --git a/components/date-picker/generatePicker/interface.ts b/components/date-picker/generatePicker/interface.ts deleted file mode 100644 index c0771f2e0c..0000000000 --- a/components/date-picker/generatePicker/interface.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { ComponentClass, ForwardedRef, Component } from 'react'; -import { PickerProps, RangePickerProps } from '.'; - -export interface CommonPickerMethods { - focus: () => void; - blur: () => void; -} - -export interface PickerComponentClass

extends ComponentClass { - new (...args: ConstructorParameters>): InstanceType> & - CommonPickerMethods; -} - -export type PickerRef

= ForwardedRef & CommonPickerMethods>; - -export type DatePickRef = PickerRef>; - -export type RangePickerRef = PickerRef>; diff --git a/components/date-picker/generatePicker/interface.tsx b/components/date-picker/generatePicker/interface.tsx index 2daf343d66..c0771f2e0c 100644 --- a/components/date-picker/generatePicker/interface.tsx +++ b/components/date-picker/generatePicker/interface.tsx @@ -1,4 +1,5 @@ -import { ComponentClass } from 'react'; +import type { ComponentClass, ForwardedRef, Component } from 'react'; +import { PickerProps, RangePickerProps } from '.'; export interface CommonPickerMethods { focus: () => void; @@ -9,3 +10,9 @@ export interface PickerComponentClass

extends ComponentClas new (...args: ConstructorParameters>): InstanceType> & CommonPickerMethods; } + +export type PickerRef

= ForwardedRef & CommonPickerMethods>; + +export type DatePickRef = PickerRef>; + +export type RangePickerRef = PickerRef>;