diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index 3e0fc90238..11ec5573cf 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -111,6 +111,13 @@ type LeafletEvents = MapEvents & FeatureGroupEvents & LayersControlEvents; +// Most react-leaflet components take two type parameters: +// - P : the component's props object +// - E : the corresponding Leaflet element + +// These type parameters aren't needed for instantiating a component, but they are useful for +// extending react-leaflet classes. + export class MapComponent
extends React.Component
{ _leafletEvents: LeafletEvents; leafletElement: E;