geoman-io/leaflet-geoman

Types fix (for crucial for react-leaflet users)

Open

#1,515 创建于 2024年9月19日

在 GitHub 查看
 (6 评论) (0 反应) (0 负责人)JavaScript (1,933 star) (404 fork)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

贡献者指南