geoman-io/leaflet-geoman

Types fix (for crucial for react-leaflet users)

Open

#1,515 opened on 2024年9月19日

GitHub で見る
 (6 comments) (0 reactions) (0 assignees)JavaScript (1,933 stars) (404 forks)batch import
help wantedtypescript

説明

Hey! I'm using the free version with react-leaflet, and all seems to work quite well but there is one main problem which is types of event handlers. The type definitions for pm event is on interface Evented, while for react-leaflet users, the event handler's prop type (which are passed to each layer's component) are inferred LeafletEventHandlerFnMap. So far, I have built my own leaflet.d.ts file to extend the type infer to match what geoman is adding. I'd for it to come by default or listen to other possible solutions from the community

コントリビューターガイド