zjfcool / react-leaflet-editable

a react component with react-leaflet and leaflet-editable
10 stars 4 forks source link

Add a Declaration File #64

Open charlieforward9 opened 5 months ago

charlieforward9 commented 5 months ago

When making this import call import ReactLeafletEditable from 'react-leaflet-editable';

I get this error:

Could not find a declaration file for module 'react-leaflet-editable'. 'c:/Users/charl/Documents/Github/Agroview2.0/node_modules/react-leaflet-editable/dist/bundle.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/react-leaflet-editable` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-leaflet-editable';`

The bundled distribution is confusing typescript (and myself).

Originally posted in https://github.com/Leaflet/Leaflet.Editable/issues/217

charlieforward9 commented 5 months ago

Opted to use this hook instead of this library due to setup issues.