import { Ref, ShallowRef } from 'vue'; import { Map } from 'ol'; import { Layer } from 'ol/layer'; import { IfAny } from '@vue/shared'; /** * Create a Layer * @param LayerClass The Class of the source which should be created * @param props The properties which should be passed to the LayerClass * @param eventsToHandle The event names list for events that should be passed from the layer through the component */ export default function useLayer(LayerClass: new (...args: any[]) => T, props: ConstructorParameters[0], eventsToHandle?: string[]): { layer: Ref extends T ? T extends T & Ref ? IfAny, T> : ShallowRef : ShallowRef; map: Map | undefined; };