import type Collection from 'ol/Collection' import type { EventsKey } from 'ol/events' import type Feature from 'ol/Feature' import { Select } from 'ol/interaction' import type { ObjectEvent } from 'ol/Object' import BaseEvent from 'ol/events/Event' import type { Condition } from 'ol/events/condition' import type { Geometry } from 'ol/geom' import type { FilterFunction, SelectEvent } from 'ol/interaction/Select' import type { Layer } from 'ol/layer' import type { Source } from 'ol/source' import type { StyleLike } from 'ol/style/Style' import type { CombinedOnSignature, EventTypes, OnSignature } from 'ol/Observable' import type { Types } from 'ol/ObjectEventType' type DeleteOnSignature = OnSignature & OnSignature & OnSignature & OnSignature & CombinedOnSignature; export interface Options { addCondition?: Condition; condition?: Condition; layers?: Layer[] | ((p0: Layer) => boolean); style?: StyleLike; removeCondition?: Condition; toggleCondition?: Condition; multi?: boolean; features?: Collection>; filter?: FilterFunction; hitTolerance?: number; } export enum DeleteEventType { DELETESTART = 'deletestart', DELETEEND = 'deleteend' } /** A Select interaction to delete features on click. * @constructor * @extends {Interaction} * @fires deletestart * @fires deleteend */ export default class Delete extends Select { /** * @param {*} options interaction.Select options */ constructor(options?: Options); /** Delete features: remove the features from the map (from all layers in the map) * @param {Collection|Array} features The features to delete * @api */ delete(features: Collection | Feature[]): void; on: DeleteOnSignature once: DeleteOnSignature un: DeleteOnSignature } export class DeleteEvent extends BaseEvent { constructor( type: DeleteEventType, features: Collection>[] | Feature[] ); features: Collection>[] | Feature[] }