Skip to content

Commit 3166f9b

Browse files
fix: resolve TypeScript syntax errors
1 parent 6e7c830 commit 3166f9b

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// @flow
2+
export { default } from './UploadDialog.tsx';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// @flow
2+
export { default } from './index.ts';

src/elements/wrappers/ContentUploader.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ import { render } from 'react-dom';
1111
import ES6Wrapper from './ES6Wrapper';
1212
import ContentUploaderPopup from '../content-uploader/ContentUploaderPopup';
1313
import WrappedContentUploaderComponent from '../content-uploader/ContentUploader';
14+
// @ts-ignore
1415
import type { UploadFileWithAPIOptions } from '../../common/types/upload';
16+
// @ts-ignore
1517
import type { BoxItem } from '../../common/types/core';
18+
// @ts-ignore
1619
import type { ModalOptions } from '../common/flowTypes';
1720

1821
class ContentUploader extends ES6Wrapper {
@@ -21,6 +24,7 @@ class ContentUploader extends ES6Wrapper {
2124
*
2225
* @return {void}
2326
*/
27+
// @ts-ignore
2428
onClose = (): void => {
2529
this.emit('close');
2630
};
@@ -31,6 +35,7 @@ class ContentUploader extends ES6Wrapper {
3135
* @param {Array} data - Completed upload items
3236
* @return {void}
3337
*/
38+
// @ts-ignore
3439
onComplete = (data: BoxItem[]): void => {
3540
this.emit('complete', data);
3641
};
@@ -41,6 +46,7 @@ class ContentUploader extends ES6Wrapper {
4146
* @param {Object} data - File and error info about failed upload
4247
* @return {void}
4348
*/
49+
// @ts-ignore
4450
onError = (data: any): void => {
4551
this.emit('error', data);
4652
};
@@ -51,6 +57,7 @@ class ContentUploader extends ES6Wrapper {
5157
* @param {Object} data - Upload item
5258
* @return {void}
5359
*/
60+
// @ts-ignore
5461
onBeforeUpload = (data: UploadFileWithAPIOptions | File): void => {
5562
this.emit('beforeupload', data);
5663
};
@@ -61,12 +68,14 @@ class ContentUploader extends ES6Wrapper {
6168
* @param {BoxItem} data - Successfully uploaded item
6269
* @return {void}
6370
*/
71+
// @ts-ignore
6472
onUpload = (data: BoxItem): void => {
6573
this.emit('upload', data);
6674
};
6775

6876
/** @inheritdoc */
6977
render() {
78+
// @ts-ignore
7079
const { modal, ...rest }: { modal?: ModalOptions } = this.options;
7180
const UploaderComponent = modal ? ContentUploaderPopup : WrappedContentUploaderComponent;
7281

0 commit comments

Comments
 (0)