From bfccb102bc1e36a6a02148a843fcc8a56ba7968d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=90=8C=E5=AD=A6?= Date: Sun, 25 Aug 2024 22:33:52 +0800 Subject: [PATCH 1/2] Fix ts error about withTour --- packages/tour/withTour.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tour/withTour.tsx b/packages/tour/withTour.tsx index caad8071..654c058f 100644 --- a/packages/tour/withTour.tsx +++ b/packages/tour/withTour.tsx @@ -1,8 +1,9 @@ import React from 'react' import { useTour } from './Context' +import { TourProps } from '.' export default function withTour

(WrappedComponent: React.ComponentType

) { - const ComponentWithTour = (props: P) => { + const ComponentWithTour = (props: Exclude) => { const tourProps = useTour() return } From 04cefb15df24d5e098ff9c0f2a8881e3529db725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=90=8C=E5=AD=A6?= Date: Thu, 29 Aug 2024 23:29:29 +0800 Subject: [PATCH 2/2] fix ts error --- packages/tour/withTour.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tour/withTour.tsx b/packages/tour/withTour.tsx index 654c058f..f3a66440 100644 --- a/packages/tour/withTour.tsx +++ b/packages/tour/withTour.tsx @@ -3,7 +3,7 @@ import { useTour } from './Context' import { TourProps } from '.' export default function withTour

(WrappedComponent: React.ComponentType

) { - const ComponentWithTour = (props: Exclude) => { + const ComponentWithTour = (props: Omit) => { const tourProps = useTour() return }