diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index cb06197187..bfd1e041d6 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,7 +1,6 @@ --- order: 6 title: Changelog -toc: false timeline: true tag: vVERSION --- diff --git a/components/switch/index.tsx b/components/switch/index.tsx index 6d9ef32538..abae39b801 100755 --- a/components/switch/index.tsx +++ b/components/switch/index.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import LoadingOutlined from '@ant-design/icons/LoadingOutlined'; import classNames from 'classnames'; import RcSwitch from 'rc-switch'; +import type { SwitchChangeEventHandler, SwitchClickEventHandler } from 'rc-switch'; import useMergedState from 'rc-util/lib/hooks/useMergedState'; import Wave from '../_util/wave'; @@ -11,11 +12,7 @@ import useSize from '../config-provider/hooks/useSize'; import useStyle from './style'; export type SwitchSize = 'small' | 'default'; -export type SwitchChangeEventHandler = ( - checked: boolean, - event: React.MouseEvent, -) => void; -export type SwitchClickEventHandler = SwitchChangeEventHandler; +export type { SwitchChangeEventHandler, SwitchClickEventHandler }; export interface SwitchProps { prefixCls?: string; @@ -110,11 +107,10 @@ const InternalSwitch = React.forwardRef((props, return wrapCSSVar( - {/* @ts-ignore */}