Browse Source

Formatting for @uppy/react types

Renée Kooi 6 years ago
parent
commit
8a8e00da2f

+ 3 - 5
packages/@uppy/react/src/CommonTypes.d.ts

@@ -1,6 +1,4 @@
-export { Uppy } from '../../core/types';
+import UppyCore = require('@uppy/core');
 
-export interface Locale {
-    strings: { [index: string]: string };
-    pluralize: (noun: string) => string;
-}
+export interface Uppy extends UppyCore.Uppy {}
+export interface Locale extends UppyCore.Locale {}

+ 19 - 19
packages/@uppy/react/src/Dashboard.d.ts

@@ -1,28 +1,28 @@
 import { Uppy, Locale } from './CommonTypes';
 
 interface MetaField {
-    id: string;
-    name: string;
-    placeholder?: string;
+  id: string;
+  name: string;
+  placeholder?: string;
 }
 
 export interface DashboardProps {
-    uppy: Uppy;
-    inline?: boolean;
-    plugins?: Array<string>;
-    width?: number;
-    height?: number;
-    showProgressDetails?: boolean;
-    showLinkToFileUploadResult?: boolean;
-    hideUploadButton?: boolean;
-    hideProgressAfterFinish?: boolean;
-    note?: string;
-    metaFields?: Array<MetaField>;
-    proudlyDisplayPoweredByUppy?: boolean;
-    disableStatusBar?: boolean;
-    disableInformer?: boolean;
-    disableThumbnailGenerator?: boolean;
-    locale?: Locale;
+  uppy: Uppy;
+  inline?: boolean;
+  plugins?: Array<string>;
+  width?: number;
+  height?: number;
+  showProgressDetails?: boolean;
+  showLinkToFileUploadResult?: boolean;
+  hideUploadButton?: boolean;
+  hideProgressAfterFinish?: boolean;
+  note?: string;
+  metaFields?: Array<MetaField>;
+  proudlyDisplayPoweredByUppy?: boolean;
+  disableStatusBar?: boolean;
+  disableInformer?: boolean;
+  disableThumbnailGenerator?: boolean;
+  locale?: Locale;
 }
 
 /**

+ 5 - 5
packages/@uppy/react/src/DashboardModal.d.ts

@@ -1,11 +1,11 @@
 import { DashboardProps } from './Dashboard';
 
 export interface DashboardModalProps extends DashboardProps {
-    target?: HTMLElement;
-    open?: boolean;
-    onRequestClose?: VoidFunction;
-    closeModalOnClickOutside?: boolean;
-    disablePageScrollWhenModalOpen?: boolean;
+  target: string | HTMLElement;
+  open?: boolean;
+  onRequestClose?: VoidFunction;
+  closeModalOnClickOutside?: boolean;
+  disablePageScrollWhenModalOpen?: boolean;
 }
 
 /**

+ 2 - 2
packages/@uppy/react/src/DragDrop.d.ts

@@ -1,8 +1,8 @@
 import { Uppy, Locale } from './CommonTypes';
 
 export interface DragDropProps {
-    uppy: Uppy;
-    locale?: Locale;
+  uppy: Uppy;
+  locale?: Locale;
 }
 
 /**

+ 3 - 3
packages/@uppy/react/src/ProgressBar.d.ts

@@ -1,9 +1,9 @@
 import { Uppy } from './CommonTypes';
 
 export interface ProgressBarProps {
-    uppy: Uppy;
-    fixed?: boolean;
-    hideAfterFinish?: boolean;
+  uppy: Uppy;
+  fixed?: boolean;
+  hideAfterFinish?: boolean;
 }
 
 /**

+ 3 - 3
packages/@uppy/react/src/StatusBar.d.ts

@@ -1,9 +1,9 @@
 import { Uppy } from './CommonTypes';
 
 export interface StatusBarProps {
-    uppy: Uppy;
-    showProgressDetails?: boolean;
-    hideAfterFinish?: boolean;
+  uppy: Uppy;
+  showProgressDetails?: boolean;
+  hideAfterFinish?: boolean;
 }
 
 /**