I'm trying to import a module, as well as some of the types from its type definition package through DefinitelyTyped. I installed both:
npm i -D leaflet
npm i -D @types/leaflet
(This is going to be a leaflet plugin which requires leaflet as a peerDependency, hence the -D on leaflet itself).
At the top of a .ts file, I try to import these:
import L from 'leaflet';
import type { LatLng } from 'leaflet'
But typescript is telling me Module '"/Users/seth/Documents/GitHub/leaflet-topography/node_modules/@types/leaflet/index"' has no default export.ts(1192). That is true, but I'm not trying to import L from the type definitions, but from the leaflet package itself. Why is typescript assuming that this is a type definition? How can I change that so that the L that I'm importing is the leaflet library itself?