Skip to content

Commit

Permalink
chore: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Dec 21, 2023
1 parent b505ccd commit f6479e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/examples/simple.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint no-console:0 */

import Upload, { type UploadProps } from 'rc-upload';
import React from 'react';
import Upload from 'rc-upload';

const style = `
.rc-upload-disabled {
opacity:0.5;
`;

const uploaderProps = {
const uploaderProps: UploadProps = {
action: '/upload.do',
data: { a: 1, b: 2 },
multiple: true,
Expand Down
4 changes: 2 additions & 2 deletions src/interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface UploadProps
style?: React.CSSProperties;
className?: string;
disabled?: boolean;
component?: React.JSXElementConstructor<any>;
component?: React.ComponentType<any> | string;
action?: Action;
method?: UploadRequestMethod;
directory?: boolean;
Expand All @@ -28,7 +28,7 @@ export interface UploadProps
beforeUpload?: (
file: RcFile,
FileList: RcFile[],
) => BeforeUploadFileType | Promise<void | BeforeUploadFileType>;
) => BeforeUploadFileType | Promise<void | BeforeUploadFileType> | void;
customRequest?: (option: UploadRequestOption) => void;
withCredentials?: boolean;
openFileDialogOnClick?: boolean;
Expand Down

0 comments on commit f6479e2

Please sign in to comment.