From ddac22429cf48221b65d24c9126839376b8f2fca Mon Sep 17 00:00:00 2001 From: David Schneider Date: Thu, 13 Apr 2017 15:48:34 -0700 Subject: [PATCH] Add MapComponent, MapComponentProps definitions. --- types/react-leaflet/index.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/react-leaflet/index.d.ts b/types/react-leaflet/index.d.ts index fe1afe8171..a2050ba46f 100644 --- a/types/react-leaflet/index.d.ts +++ b/types/react-leaflet/index.d.ts @@ -77,6 +77,17 @@ type LeafletEvents = LeafletLayerEvents & LeafletOtherEvents & LeafletDraggingEvents; +type MapComponentProps = React.HTMLProps & LeafletEvents; + +export class MapComponent

extends React.Component { + _leafletEvents: LeafletEvents; + leafletElement: E; + extractLeafletEvents(props: P): LeafletEvents; + bindLeafletEvents(next: LeafletEvents, prev: LeafletEvents): LeafletEvents; + fireLeafletEvent(type: string, data: any): void; + getOptions(props: P): P; +} + interface MapProps extends React.HTMLProps, LeafletLayerEvents, LeafletMapStateChangeEvents, LeafletPopupEvents, LeafletTooltipEvents, LeafletLocationEvents, LeafletInteractionEvents, LeafletOtherEvents, Leaflet.MapOptions { animate?: boolean;