I'm currently working on an application that utilizes Dropzone 4.3 and is built with Typescript. Previously, we needed to set a global variable on Dropzone for everything to work smoothly.
Dropzone.autoDiscover = false;
These are the node packages I have installed:
"@types/dropzone": "^4.3.35",
"dropzone": "4.3.0",
The auto discover line now throws this error:
Error TS2686 'Dropzone' refers to a UMD global, but the current file is a module. Consider adding an import instead.
To address this issue, I included the following:
import * as Dropzone from 'dropzone';
However, this resulted in a new error:
Error TS2540 Cannot assign to 'autoDiscover' because it is a constant or a read-only property.
Can you identify where I might have made a mistake in my approach?