From b410661e5bdfe1711d4e8055cf4f99d95bfc6a59 Mon Sep 17 00:00:00 2001 From: David Schneider Date: Mon, 17 Apr 2017 16:05:22 -0700 Subject: [PATCH] Add comment to explain the type parameters. --- types/react-leaflet/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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;