Browse Source

Weird import/export situation...

...this is weird in JS and it becomes even more weird in TS.
Do we really mean what we say here? We import a function and
re-export it as something that looks
like a class name.
Matthias Bohlen 6 years ago
parent
commit
0d4fea6f3e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/uppy/types/index.d.ts

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

@@ -6,7 +6,9 @@
 export { default as Core } from '@uppy/core';
 export { default as Core } from '@uppy/core';
 
 
 // Stores
 // Stores
-export { default as DefaultStore } from '@uppy/store-default';
+import DefaultStore = require('@uppy/store-default');
+export { DefaultStore };  // this is weird: exporting a function as something that sounds like a class name!
+// do we really mean what the line above says?
 export { default as ReduxStore } from '@uppy/store-redux';
 export { default as ReduxStore } from '@uppy/store-redux';
 
 
 // UI plugins
 // UI plugins