I've encountered an issue with my TypeScript code using OpenLayers. When I try to import a second code file into the main one, I get an error that says:
index.ts(3,15): error TS2686: 'ol' refers to a UMD global, but the current file is a module. Consider adding an import instead.
The initial code snippet works fine, and I'm compiling against OpenLayers types by installing them like this:
npm install --save-dev openlayers
npm install --save-dev @types/openlayers
How can I successfully compile a TypeScript code base with multiple files when using OpenLayers?