geoman-io/leaflet-geoman

Types fix (for crucial for react-leaflet users)

已關閉

#1,515 建立於 2024年9月19日

 (6 則留言) (0 個反應) (0 位負責人)JavaScript (404 個分叉)batch import
help wantedtypescript

倉庫指標

星標
 (1,933 顆星)
PR 合併指標
 (平均合併 9天 6小時) (30 天內合併 5 個 PR)

描述

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

貢獻者指南