Ver código fonte

Remove unnecessary `declare module` wrappers from .d.ts files.

Renée Kooi 6 anos atrás
pai
commit
1222873698

+ 14 - 16
packages/@uppy/aws-s3/types/index.d.ts

@@ -1,21 +1,19 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/aws-s3' {
-  export interface AwsS3UploadParameters {
-    method?: string;
-    url: string;
-    fields?: { [type: string]: string };
-    headers?: { [type: string]: string };
-  }
+export interface AwsS3UploadParameters {
+  method?: string;
+  url: string;
+  fields?: { [type: string]: string };
+  headers?: { [type: string]: string };
+}
 
-  export interface AwsS3Options extends PluginOptions {
-    serverUrl: string;
-    getUploadParameters(file: object): Promise<AwsS3UploadParameters>;
-    timeout: number;
-    limit: number;
-  }
+export interface AwsS3Options extends PluginOptions {
+  serverUrl: string;
+  getUploadParameters(file: object): Promise<AwsS3UploadParameters>;
+  timeout: number;
+  limit: number;
+}
 
-  export default class AwsS3 extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<AwsS3Options>);
-  }
+export default class AwsS3 extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<AwsS3Options>);
 }

+ 116 - 118
packages/@uppy/core/types/index.d.ts

@@ -1,127 +1,125 @@
-declare module '@uppy/core' {
-  // TODO actually use the properties here
-  export interface UppyFile {
-    data: Blob | File;
-    extension: string;
-    id: string;
-    isPaused: boolean;
-    isRemote: boolean;
-    meta: {
-      name: string;
-      type?: string;
-    };
+// TODO actually use the properties here
+export interface UppyFile {
+  data: Blob | File;
+  extension: string;
+  id: string;
+  isPaused: boolean;
+  isRemote: boolean;
+  meta: {
     name: string;
-    preview?: string;
-    progress?: {
-      uploadStarted: number;
-      uploadComplete: boolean;
-      percentage: number;
-      bytesUploaded: number;
-      bytesTotal: number;
-    };
-    remote?: {
-      host: string;
-      url: string;
-      body?: object;
-    };
-    size: number;
-    source?: string;
     type?: string;
-    uploadURL?: string;
-  }
-
-  export interface PluginOptions {
-    id?: string;
-  }
+  };
+  name: string;
+  preview?: string;
+  progress?: {
+    uploadStarted: number;
+    uploadComplete: boolean;
+    percentage: number;
+    bytesUploaded: number;
+    bytesTotal: number;
+  };
+  remote?: {
+    host: string;
+    url: string;
+    body?: object;
+  };
+  size: number;
+  source?: string;
+  type?: string;
+  uploadURL?: string;
+}
 
-  export class Plugin {
-    constructor(uppy: Uppy, opts?: PluginOptions);
-    getPluginState(): object;
-    setPluginState(update: any): object;
-    update(state?: object): void;
-    mount(target: any, plugin: any): void;
-    render(state: object): void;
-    addTarget(plugin: any): void;
-    unmount(): void;
-    install(): void;
-    uninstall(): void;
-  }
+export interface PluginOptions {
+  id?: string;
+}
 
-  export interface Store {
-    getState(): object;
-    setState(patch: object): void;
-    subscribe(listener: any): () => void;
-  }
+export class Plugin {
+  constructor(uppy: Uppy, opts?: PluginOptions);
+  getPluginState(): object;
+  setPluginState(update: any): object;
+  update(state?: object): void;
+  mount(target: any, plugin: any): void;
+  render(state: object): void;
+  addTarget(plugin: any): void;
+  unmount(): void;
+  install(): void;
+  uninstall(): void;
+}
 
-  export interface UppyOptions {
-    id: string;
-    autoProceed: boolean;
-    debug: boolean;
-    restrictions: {
-      maxFileSize: false,
-      maxNumberOfFiles: false,
-      minNumberOfFiles: false,
-      allowedFileTypes: false
-    };
-    target: string | Plugin;
-    meta: any;
-    // onBeforeFileAdded: (currentFile, files) => currentFile,
-    // onBeforeUpload: (files) => files,
-    locale: any;
-    store: Store;
-  }
+export interface Store {
+  getState(): object;
+  setState(patch: object): void;
+  subscribe(listener: any): () => void;
+}
 
-  export interface UploadResult {
-    successful: Array<UppyFile>;
-    failed: Array<UppyFile>;
-  }
+export interface UppyOptions {
+  id: string;
+  autoProceed: boolean;
+  debug: boolean;
+  restrictions: {
+    maxFileSize: false,
+    maxNumberOfFiles: false,
+    minNumberOfFiles: false,
+    allowedFileTypes: false
+  };
+  target: string | Plugin;
+  meta: any;
+  // onBeforeFileAdded: (currentFile, files) => currentFile,
+  // onBeforeUpload: (files) => files,
+  locale: any;
+  store: Store;
+}
 
-  type LogLevel = 'info' | 'warning' | 'error';
-  export class Uppy {
-    constructor(opts?: Partial<UppyOptions>);
-    on(event: 'upload-success', callback: (file: UppyFile, body: any, uploadURL: string) => any): Uppy;
-    on(event: 'complete', callback: (result: UploadResult) => void): Uppy;
-    on(event: string, callback: (...args: any[]) => any): Uppy;
-    off(event: string, callback: any): Uppy;
-    updateAll(state: object): void;
-    setState(patch: object): void;
-    getState(): object;
-    readonly state: object;
-    setFileState(fileID: string, state: object): void;
-    resetProgress(): void;
-    addPreProcessor(fn: any): void;
-    removePreProcessor(fn: any): void;
-    addPostProcessor(fn: any): void;
-    removePostProcessor(fn: any): void;
-    addUploader(fn: any): void;
-    removeUploader(fn: any): void;
-    setMeta(data: any): void;
-    setFileMeta(fileID: string, data: any): void;
-    getFile(fileID: string): UppyFile;
-    getFiles(): UppyFile[];
-    addFile(file: object): void;
-    removeFile(fileID: string): void;
-    pauseResume(fileID: string): boolean;
-    pauseAll(): void;
-    resumeAll(): void;
-    retryAll(): void;
-    cancelAll(): void;
-    retryUpload(fileID: string): any;
-    reset(): void;
-    getID(): string;
-    use(plugin: typeof Plugin, opts: any): Uppy;
-    getPlugin(name: string): Plugin;
-    iteratePlugins(method: any): void;
-    removePlugin(instance: Plugin): void;
-    close(): void;
-    info(message: string | { message: string; details: string; }, type?: LogLevel, duration?: number): void;
-    hideInfo(): void;
-    log(msg: string, type?: LogLevel): void;
-    run(): Uppy;
-    restore(uploadID: string): Promise<any>;
-    addResultData(uploadID: string, data: any): void;
-    upload(): Promise<any>;
-  }
+export interface UploadResult {
+  successful: Array<UppyFile>;
+  failed: Array<UppyFile>;
+}
 
-  export default function createUppy(opts?: Partial<UppyOptions>): Uppy;
+type LogLevel = 'info' | 'warning' | 'error';
+export class Uppy {
+  constructor(opts?: Partial<UppyOptions>);
+  on(event: 'upload-success', callback: (file: UppyFile, body: any, uploadURL: string) => any): Uppy;
+  on(event: 'complete', callback: (result: UploadResult) => void): Uppy;
+  on(event: string, callback: (...args: any[]) => any): Uppy;
+  off(event: string, callback: any): Uppy;
+  updateAll(state: object): void;
+  setState(patch: object): void;
+  getState(): object;
+  readonly state: object;
+  setFileState(fileID: string, state: object): void;
+  resetProgress(): void;
+  addPreProcessor(fn: any): void;
+  removePreProcessor(fn: any): void;
+  addPostProcessor(fn: any): void;
+  removePostProcessor(fn: any): void;
+  addUploader(fn: any): void;
+  removeUploader(fn: any): void;
+  setMeta(data: any): void;
+  setFileMeta(fileID: string, data: any): void;
+  getFile(fileID: string): UppyFile;
+  getFiles(): UppyFile[];
+  addFile(file: object): void;
+  removeFile(fileID: string): void;
+  pauseResume(fileID: string): boolean;
+  pauseAll(): void;
+  resumeAll(): void;
+  retryAll(): void;
+  cancelAll(): void;
+  retryUpload(fileID: string): any;
+  reset(): void;
+  getID(): string;
+  use(plugin: typeof Plugin, opts: any): Uppy;
+  getPlugin(name: string): Plugin;
+  iteratePlugins(method: any): void;
+  removePlugin(instance: Plugin): void;
+  close(): void;
+  info(message: string | { message: string; details: string; }, type?: LogLevel, duration?: number): void;
+  hideInfo(): void;
+  log(msg: string, type?: LogLevel): void;
+  run(): Uppy;
+  restore(uploadID: string): Promise<any>;
+  addResultData(uploadID: string, data: any): void;
+  upload(): Promise<any>;
 }
+
+export default function createUppy(opts?: Partial<UppyOptions>): Uppy;

+ 31 - 33
packages/@uppy/dashboard/types/index.d.ts

@@ -1,37 +1,35 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/dashboard' {
-  export interface DashboardOptions extends PluginOptions {
-    onRequestCloseModal: () => void;
-    disablePageScrollWhenModalOpen: boolean;
-    closeModalOnClickOutside: boolean;
-    trigger: string | HTMLElement;
-    inline: boolean;
-    defaultTabIcon: string;
-    hideUploadButton: boolean;
-    width: string;
-    height: string;
-    note: string;
-    showLinkToFileUploadResult: boolean;
-    proudlyDisplayPoweredByUppy: boolean;
-    metaFields: string[];
-    plugins: string[];
-    disableStatusBar: boolean;
-    showProgressDetails: boolean;
-    hideProgressAfterFinish: boolean;
-    disableInformer: boolean;
-    disableThumbnailGenerator: boolean;
-  }
+export interface DashboardOptions extends PluginOptions {
+  onRequestCloseModal: () => void;
+  disablePageScrollWhenModalOpen: boolean;
+  closeModalOnClickOutside: boolean;
+  trigger: string | HTMLElement;
+  inline: boolean;
+  defaultTabIcon: string;
+  hideUploadButton: boolean;
+  width: string;
+  height: string;
+  note: string;
+  showLinkToFileUploadResult: boolean;
+  proudlyDisplayPoweredByUppy: boolean;
+  metaFields: string[];
+  plugins: string[];
+  disableStatusBar: boolean;
+  showProgressDetails: boolean;
+  hideProgressAfterFinish: boolean;
+  disableInformer: boolean;
+  disableThumbnailGenerator: boolean;
+}
 
-  export default class Dashboard extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<DashboardOptions>);
-    addTarget(plugin: Plugin): HTMLElement;
-    hideAllPanels(): void;
-    openModal(): void;
-    closeModal(): void;
-    isModalOpen(): boolean;
-    render(state: object): void;
-    install(): void;
-    uninstall(): void;
-  }
+export default class Dashboard extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<DashboardOptions>);
+  addTarget(plugin: Plugin): HTMLElement;
+  hideAllPanels(): void;
+  openModal(): void;
+  closeModal(): void;
+  isModalOpen(): boolean;
+  render(state: object): void;
+  install(): void;
+  uninstall(): void;
 }

+ 9 - 11
packages/@uppy/drag-drop/types/index.d.ts

@@ -1,15 +1,13 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/drag-drop' {
-  export interface DragDropOptions extends PluginOptions {
-    inputName: string;
-    allowMultipleFiles: boolean;
-    width: string;
-    height: string;
-    note: string;
-  }
+export interface DragDropOptions extends PluginOptions {
+  inputName: string;
+  allowMultipleFiles: boolean;
+  width: string;
+  height: string;
+  note: string;
+}
 
-  export default class DragDrop extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<DragDropOptions>);
-  }
+export default class DragDrop extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<DragDropOptions>);
 }

+ 5 - 7
packages/@uppy/dropbox/types/index.d.ts

@@ -1,11 +1,9 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/dropbox' {
-  export interface DropboxOptions extends PluginOptions {
-    serverUrl: string;
-  }
+export interface DropboxOptions extends PluginOptions {
+  serverUrl: string;
+}
 
-  export default class Dropbox extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<DropboxOptions>);
-  }
+export default class Dropbox extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<DropboxOptions>);
 }

+ 6 - 8
packages/@uppy/file-input/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/file-input' {
-  export interface FileInputOptions extends PluginOptions {
-    pretty: boolean;
-    inputName: string;
-  }
+export interface FileInputOptions extends PluginOptions {
+  pretty: boolean;
+  inputName: string;
+}
 
-  export default class FileInput extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<FileInputOptions>);
-  }
+export default class FileInput extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<FileInputOptions>);
 }

+ 9 - 11
packages/@uppy/form/types/index.d.ts

@@ -1,15 +1,13 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/form' {
-  export interface FormOptions extends PluginOptions {
-    getMetaFromForm: boolean;
-    addResultToForm: boolean;
-    submitOnSuccess: boolean;
-    triggerUploadOnSubmit: boolean;
-    resultName: string;
-  }
+export interface FormOptions extends PluginOptions {
+  getMetaFromForm: boolean;
+  addResultToForm: boolean;
+  submitOnSuccess: boolean;
+  triggerUploadOnSubmit: boolean;
+  resultName: string;
+}
 
-  export default class Form extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<FormOptions>);
-  }
+export default class Form extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<FormOptions>);
 }

+ 7 - 9
packages/@uppy/golden-retriever/types/index.d.ts

@@ -1,13 +1,11 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/golden-retriever' {
-  export interface GoldenRetrieverOptions extends PluginOptions {
-    expires: number;
-    serviceWorker: boolean;
-    indexedDB: any;
-  }
+export interface GoldenRetrieverOptions extends PluginOptions {
+  expires: number;
+  serviceWorker: boolean;
+  indexedDB: any;
+}
 
-  export default class GoldenRetriever extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<GoldenRetrieverOptions>);
-  }
+export default class GoldenRetriever extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<GoldenRetrieverOptions>);
 }

+ 6 - 8
packages/@uppy/google-drive/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/google-drive' {
-  export interface GoogleDriveOptions extends PluginOptions {
-    serverUrl: string;
-    // TODO inherit from ProviderOptions
-  }
+export interface GoogleDriveOptions extends PluginOptions {
+  serverUrl: string;
+  // TODO inherit from ProviderOptions
+}
 
-  export default class GoogleDrive extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<GoogleDriveOptions>);
-  }
+export default class GoogleDrive extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<GoogleDriveOptions>);
 }

+ 11 - 13
packages/@uppy/informer/types/index.d.ts

@@ -1,18 +1,16 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/informer' {
-  interface Color {
-    bg: string | number;
-    text: string | number;
-  }
+interface Color {
+  bg: string | number;
+  text: string | number;
+}
 
-  export interface InformerOptions extends PluginOptions {
-    typeColors: {
-      [type: string]: Color
-    };
-  }
+export interface InformerOptions extends PluginOptions {
+  typeColors: {
+    [type: string]: Color
+  };
+}
 
-  export default class Informer extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<InformerOptions>);
-  }
+export default class Informer extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<InformerOptions>);
 }

+ 6 - 8
packages/@uppy/instagram/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/instagram' {
-  export interface InstagramOptions extends PluginOptions {
-    serverUrl: string;
-    // TODO inherit from ProviderOptions
-  }
+export interface InstagramOptions extends PluginOptions {
+  serverUrl: string;
+  // TODO inherit from ProviderOptions
+}
 
-  export default class Instagram extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<InstagramOptions>);
-  }
+export default class Instagram extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<InstagramOptions>);
 }

+ 6 - 8
packages/@uppy/progress-bar/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/progress-bar' {
-  export interface ProgressBarOptions extends PluginOptions {
-    hideAfterFinish: boolean;
-    fixed: boolean;
-  }
+export interface ProgressBarOptions extends PluginOptions {
+  hideAfterFinish: boolean;
+  fixed: boolean;
+}
 
-  export default class ProgressBar extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<ProgressBarOptions>);
-  }
+export default class ProgressBar extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<ProgressBarOptions>);
 }

+ 4 - 6
packages/@uppy/redux-dev-tools/types/index.d.ts

@@ -1,10 +1,8 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/redux-dev-tools' {
-  export interface ReduxDevToolsOptions extends PluginOptions {
-  }
+export interface ReduxDevToolsOptions extends PluginOptions {
+}
 
-  export default class ReduxDevTools extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<ReduxDevToolsOptions>);
-  }
+export default class ReduxDevTools extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<ReduxDevToolsOptions>);
 }

+ 33 - 35
packages/@uppy/server-utils/types/index.d.ts

@@ -1,43 +1,41 @@
 import { Uppy } from '@uppy/core';
 
-declare module '@uppy/server-utils' {
-  export interface RequestClientOptions {
-    serverUrl: string;
-  }
+export interface RequestClientOptions {
+  serverUrl: string;
+}
 
-  export class RequestClient {
-    constructor (uppy: Uppy, opts: RequestClientOptions);
-    get (path: string): Promise<any>;
-    post (path: string, data: object): Promise<any>;
-    delete (path: string, data: object): Promise<any>;
-  }
+export class RequestClient {
+  constructor (uppy: Uppy, opts: RequestClientOptions);
+  get (path: string): Promise<any>;
+  post (path: string, data: object): Promise<any>;
+  delete (path: string, data: object): Promise<any>;
+}
 
-  export interface ProviderOptions {
-    serverUrl: string;
-    provider: string;
-    authProvider?: string;
-    name?: string;
-  }
+export interface ProviderOptions {
+  serverUrl: string;
+  provider: string;
+  authProvider?: string;
+  name?: string;
+}
 
-  export class Provider extends RequestClient {
-    constructor (uppy: Uppy, opts: ProviderOptions);
-    checkAuth (): Promise<boolean>;
-    authUrl (): string;
-    fileUrl (id: string): string;
-    list (directory: string): Promise<any>;
-    logout (redirect?: string): Promise<any>;
-  }
+export class Provider extends RequestClient {
+  constructor (uppy: Uppy, opts: ProviderOptions);
+  checkAuth (): Promise<boolean>;
+  authUrl (): string;
+  fileUrl (id: string): string;
+  list (directory: string): Promise<any>;
+  logout (redirect?: string): Promise<any>;
+}
 
-  export interface SocketOptions {
-    target: string;
-  }
+export interface SocketOptions {
+  target: string;
+}
 
-  export class Socket {
-    constructor (opts: SocketOptions);
-    close (): void;
-    send (action: string, payload: any): void;
-    on (action: string, handler: (any) => void);
-    emit (action: string, payload: (any) => void);
-    once (action: string, handler: (any) => void);
-  }
+export class Socket {
+  constructor (opts: SocketOptions);
+  close (): void;
+  send (action: string, payload: any): void;
+  on (action: string, handler: (any) => void);
+  emit (action: string, payload: (any) => void);
+  once (action: string, handler: (any) => void);
 }

+ 7 - 9
packages/@uppy/statusbar/types/index.d.ts

@@ -1,13 +1,11 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/statusbar' {
-  export interface StatusBarOptions extends PluginOptions {
-    showProgressDetails: boolean;
-    hideUploadButton: boolean;
-    hideAfterFinish: boolean;
-  }
+export interface StatusBarOptions extends PluginOptions {
+  showProgressDetails: boolean;
+  hideUploadButton: boolean;
+  hideAfterFinish: boolean;
+}
 
-  export default class StatusBar extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<StatusBarOptions>);
-  }
+export default class StatusBar extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<StatusBarOptions>);
 }

+ 7 - 9
packages/@uppy/store-default/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Store } from '@uppy/core';
 
-declare module '@uppy/store-default' {
-  class DefaultStore implements Store {
-    constructor();
-    getState(): object;
-    setState(patch: object): void;
-    subscribe(listener: any): () => void;
-  }
-
-  export default function createDefaultStore(): DefaultStore;
+declare class DefaultStore implements Store {
+  constructor();
+  getState(): object;
+  setState(patch: object): void;
+  subscribe(listener: any): () => void;
 }
+
+export default function createDefaultStore(): DefaultStore;

+ 14 - 16
packages/@uppy/store-redux/types/index.d.ts

@@ -1,21 +1,19 @@
 import { Store } from '@uppy/core';
 import { Reducer, Middleware, Store as Redux } from 'redux';
 
-declare module '@uppy/store-redux' {
-  export interface ReduxStoreOptions {
-    store: Redux<object>;
-    id?: string;
-    selector?: (state: any) => object;
-  }
-
-  class ReduxStore implements Store {
-    constructor(opts: ReduxStoreOptions);
-    getState(): object;
-    setState(patch: object): void;
-    subscribe(listener: any): () => void;
-  }
+export interface ReduxStoreOptions {
+  store: Redux<object>;
+  id?: string;
+  selector?: (state: any) => object;
+}
 
-  export default function createReduxStore(opts: ReduxStoreOptions): ReduxStore;
-  export const reducer: Reducer<object>;
-  export const middleware: Middleware;
+declare class ReduxStore implements Store {
+  constructor(opts: ReduxStoreOptions);
+  getState(): object;
+  setState(patch: object): void;
+  subscribe(listener: any): () => void;
 }
+
+export default function createReduxStore(opts: ReduxStoreOptions): ReduxStore;
+export const reducer: Reducer<object>;
+export const middleware: Middleware;

+ 5 - 7
packages/@uppy/thumbnail-generator/types/index.d.ts

@@ -1,11 +1,9 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/thumbnail-generator' {
-  export interface ThumbnailGeneratorOptions extends PluginOptions {
-    thumbnailWidth: number;
-  }
+export interface ThumbnailGeneratorOptions extends PluginOptions {
+  thumbnailWidth: number;
+}
 
-  export default class ThumbnailGenerator extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<ThumbnailGeneratorOptions>);
-  }
+export default class ThumbnailGenerator extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<ThumbnailGeneratorOptions>);
 }

+ 17 - 19
packages/@uppy/transloadit/types/index.d.ts

@@ -1,24 +1,22 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/transloadit' {
-  export interface AssemblyOptions {
-    params: object;
-    fields: object;
-    signature: string;
-  }
+export interface AssemblyOptions {
+  params: object;
+  fields: object;
+  signature: string;
+}
 
-  export interface TransloaditOptions extends PluginOptions {
-    params: any;
-    signature: string;
-    service: string;
-    waitForEncoding: boolean;
-    waitForMetadata: boolean;
-    importFromUploadURLs: boolean;
-    alwaysRunAssembly: boolean;
-    getAssemblyOptions: (file: object) => AssemblyOptions | Promise<AssemblyOptions>;
-  }
+export interface TransloaditOptions extends PluginOptions {
+  params: any;
+  signature: string;
+  service: string;
+  waitForEncoding: boolean;
+  waitForMetadata: boolean;
+  importFromUploadURLs: boolean;
+  alwaysRunAssembly: boolean;
+  getAssemblyOptions: (file: object) => AssemblyOptions | Promise<AssemblyOptions>;
+}
 
-  export default class Transloadit extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<TransloaditOptions>);
-  }
+export default class Transloadit extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<TransloaditOptions>);
 }

+ 10 - 12
packages/@uppy/tus/types/index.d.ts

@@ -1,16 +1,14 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/tus' {
-  export interface TusOptions extends PluginOptions {
-    limit: number;
-    endpoint: string;
-    uploadUrl: string;
-    useFastRemoteRetry: boolean;
-    resume: boolean;
-    autoRetry: boolean;
-  }
+export interface TusOptions extends PluginOptions {
+  limit: number;
+  endpoint: string;
+  uploadUrl: string;
+  useFastRemoteRetry: boolean;
+  resume: boolean;
+  autoRetry: boolean;
+}
 
-  export default class Tus extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<TusOptions>);
-  }
+export default class Tus extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<TusOptions>);
 }

+ 6 - 8
packages/@uppy/url/types/index.d.ts

@@ -1,12 +1,10 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/url' {
-  export interface UrlOptions extends PluginOptions {
-    serverUrl: string;
-    // TODO inherit from ProviderOptions
-  }
+export interface UrlOptions extends PluginOptions {
+  serverUrl: string;
+  // TODO inherit from ProviderOptions
+}
 
-  export default class Url extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<UrlOptions>);
-  }
+export default class Url extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<UrlOptions>);
 }

+ 1 - 3
packages/@uppy/utils/types/index.d.ts

@@ -1,3 +1 @@
-declare module '@uppy/utils' {
-  // TODO ?
-}
+// TODO ?

+ 9 - 11
packages/@uppy/webcam/types/index.d.ts

@@ -1,15 +1,13 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/webcam' {
-  export interface WebcamOptions extends PluginOptions {
-    onBeforeSnapshot?: () => Promise<void>;
-    countdown?: number | boolean;
-    mirror?: boolean;
-    facingMode?: string;
-    modes: Array<'video-audio' | 'video-only' | 'audio-only' | 'picturee'>;
-  }
+export interface WebcamOptions extends PluginOptions {
+  onBeforeSnapshot?: () => Promise<void>;
+  countdown?: number | boolean;
+  mirror?: boolean;
+  facingMode?: string;
+  modes: Array<'video-audio' | 'video-only' | 'audio-only' | 'picturee'>;
+}
 
-  export default class Webcam extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<WebcamOptions>);
-  }
+export default class Webcam extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<WebcamOptions>);
 }

+ 14 - 16
packages/@uppy/xhrupload/types/index.d.ts

@@ -1,20 +1,18 @@
 import { Plugin, PluginOptions, Uppy } from '@uppy/core';
 
-declare module '@uppy/xhrupload' {
-  export interface XHRUploadOptions extends PluginOptions {
-    limit: string;
-    bundle: boolean;
-    formData: FormData;
-    headers: any;
-    metaFields: string[];
-    fieldName: string;
-    timeout: number;
-    responseUrlFieldName: string;
-    endpoint: string;
-    method: 'GET' | 'POST' | 'HEAD';
-  }
+export interface XHRUploadOptions extends PluginOptions {
+  limit: string;
+  bundle: boolean;
+  formData: FormData;
+  headers: any;
+  metaFields: string[];
+  fieldName: string;
+  timeout: number;
+  responseUrlFieldName: string;
+  endpoint: string;
+  method: 'GET' | 'POST' | 'HEAD';
+}
 
-  export default class XHRUpload extends Plugin {
-    constructor(uppy: Uppy, opts: Partial<XHRUploadOptions>);
-  }
+export default class XHRUpload extends Plugin {
+  constructor(uppy: Uppy, opts: Partial<XHRUploadOptions>);
 }