ant-design/components/upload/index.tsx
Dave ae62ef7087
[v4] Fix(types): external module type error (CompoundedComponent) (#39058)
* fix(types): external module type error (CompoundedComponent)

* feat(types): export CountdownProps
2023-01-03 11:46:48 +08:00

22 lines
698 B
TypeScript

import Dragger from './Dragger';
import type { UploadProps } from './Upload';
import InternalUpload, { LIST_IGNORE } from './Upload';
export { DraggerProps } from './Dragger';
export { RcFile, UploadChangeParam, UploadFile, UploadListProps, UploadProps } from './interface';
type InternalUploadType = typeof InternalUpload;
type CompoundedComponent<T = any> = InternalUploadType & {
<U extends T>(
props: React.PropsWithChildren<UploadProps<U>> & React.RefAttributes<any>,
): React.ReactElement;
Dragger: typeof Dragger;
LIST_IGNORE: string;
};
const Upload = InternalUpload as CompoundedComponent;
Upload.Dragger = Dragger;
Upload.LIST_IGNORE = LIST_IGNORE;
export default Upload;