import { EventListenerStatus, EventListenerActions } from './createEventListenerComposable'; import { Nullable, MapEventTypes } from '../../types'; import { MaybeRef } from 'vue'; import { Map } from 'maplibre-gl'; export { EventListenerStatus }; /** * `T` is inferred from `event`, which is the whole point of it: a handler * registered for `'click'` has to receive a `MapMouseEvent`, not the union of * every map event. The generic used to sit on `on` itself, where nothing could * ever infer it, so `event.lngLat` failed to compile in correct code. */ interface MapEventListenerProps { map: MaybeRef>; event: T; on: (e: MapEventTypes[T]) => void; debug?: boolean; once?: boolean; } interface MapEventListenerActions extends EventListenerActions { } /** * Composable for managing MapLibre GL Map Event Listeners */ export declare function useMapEventListener(props: MapEventListenerProps): MapEventListenerActions;