type: to put the ts type into useMemo generics (#44904)

This commit is contained in:
李勇 2023-09-16 02:16:53 +08:00 committed by GitHub
parent 2627caebb4
commit 7eb93ad657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import * as React from 'react';
import FileTwoTone from '@ant-design/icons/FileTwoTone';
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
import PaperClipOutlined from '@ant-design/icons/PaperClipOutlined';
@ -5,7 +6,7 @@ import PictureTwoTone from '@ant-design/icons/PictureTwoTone';
import classNames from 'classnames';
import type { CSSMotionListProps } from 'rc-motion';
import CSSMotion, { CSSMotionList } from 'rc-motion';
import * as React from 'react';
import useForceUpdate from '../../_util/hooks/useForceUpdate';
import initCollapseMotion from '../../_util/motion';
import { cloneElement, isValidElement } from '../../_util/reactNode';
@ -181,7 +182,7 @@ const InternalUploadList: React.ForwardRefRenderFunction<UploadListRef, UploadLi
motionAppear,
};
const listItemMotion: Partial<CSSMotionListProps> = React.useMemo(() => {
const listItemMotion = React.useMemo<Partial<CSSMotionListProps>>(() => {
const motion = {
...initCollapseMotion(rootPrefixCls),
};