type: correct type & remove useless type (#43256)

This commit is contained in:
thinkasany 2023-06-29 01:16:11 +08:00 committed by GitHub
parent 91be823272
commit 4a4d276d25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,8 +76,6 @@ type CompoundedComponent = React.ForwardRefExoticComponent<
__ANT_BUTTON: boolean;
};
type Loading = number | boolean;
type LoadingConfigType = {
loading: boolean;
delay: number;
@ -137,7 +135,7 @@ const InternalButton: React.ForwardRefRenderFunction<
const loadingOrDelay = useMemo<LoadingConfigType>(() => getLoadingConfig(loading), [loading]);
const [innerLoading, setLoading] = useState<Loading>(loadingOrDelay.loading);
const [innerLoading, setLoading] = useState<boolean>(loadingOrDelay.loading);
const [hasTwoCNChar, setHasTwoCNChar] = useState<boolean>(false);