From 526d66194e4e1c2162096789da28d052ff6f9dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Fri, 30 Dec 2022 16:52:34 +0800 Subject: [PATCH 1/2] type --- components/tour/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/tour/index.tsx b/components/tour/index.tsx index 87af40ced01d..aa2345094319 100644 --- a/components/tour/index.tsx +++ b/components/tour/index.tsx @@ -8,9 +8,11 @@ import useStyle from './style'; import type { TourProps, TourStepProps } from './interface'; import PurePanel from './PurePanel'; -const Tour: React.ForwardRefRenderFunction & { +interface CompoundedComponent { _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel; -} = (props) => { +} + +const Tour: React.FC & CompoundedComponent = (props) => { const { prefixCls: customizePrefixCls, steps, From 34dfa02723fb1e95408ab2688f21ff4f0dbfeaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=97=E5=98=89=E7=94=B7?= <574980606@qq.com> Date: Fri, 30 Dec 2022 17:09:47 +0800 Subject: [PATCH 2/2] fix --- components/tour/index.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/tour/index.tsx b/components/tour/index.tsx index aa2345094319..ce9a35acc291 100644 --- a/components/tour/index.tsx +++ b/components/tour/index.tsx @@ -8,11 +8,9 @@ import useStyle from './style'; import type { TourProps, TourStepProps } from './interface'; import PurePanel from './PurePanel'; -interface CompoundedComponent { - _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel; -} - -const Tour: React.FC & CompoundedComponent = (props) => { +const Tour: React.FC & { _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel } = ( + props, +) => { const { prefixCls: customizePrefixCls, steps,