How do I add Typescript definitions for Leaflet plugins

后端 未结 3 1758
Happy的楠姐
Happy的楠姐 2021-02-06 15:41

I would like to use easy-buttons plugin with Typescript https://github.com/CliffCloud/Leaflet.EasyButton/blob/master/src/easy-button.js and but it doesn\'t come with Typescript

3条回答
  •  离开以前
    2021-02-06 16:12

    It actually does now. You should just

    import * as L from 'leaflet';
    import 'leaflet-easybutton/src/easy-button';
    
    

提交回复
热议问题