mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix(upload): props type declaration (#26347)
* fix(upload): props type declaration * fix lint * chore: add type test case
This commit is contained in:
parent
71bdb0ab33
commit
d8215589de
@ -338,7 +338,9 @@ const InternalUpload: React.ForwardRefRenderFunction<unknown, UploadProps> = (pr
|
||||
};
|
||||
|
||||
interface CompoundedComponent
|
||||
extends React.ForwardRefExoticComponent<UploadProps & React.RefAttributes<any>> {
|
||||
extends React.ForwardRefExoticComponent<
|
||||
React.PropsWithChildren<UploadProps> & React.RefAttributes<any>
|
||||
> {
|
||||
Dragger: typeof Dragger;
|
||||
}
|
||||
|
||||
|
13
components/upload/__tests__/type.test.tsx
Normal file
13
components/upload/__tests__/type.test.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import Upload from '..';
|
||||
|
||||
describe('Upload.typescript', () => {
|
||||
it('Upload', () => {
|
||||
const upload = (
|
||||
<Upload>
|
||||
<span>click to upload</span>
|
||||
</Upload>
|
||||
);
|
||||
expect(upload).toBeTruthy();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user