// ol-ext 4.0.38 ships no TypeScript declarations and there is no @types/ol-ext. // This local declaration covers only what the probe touches. It deliberately // lives inside the probe directory: if the gate fails, deleting the directory // removes the typing debt with it. Promoting ol-ext to a real dependency would // also mean owning a real declaration file. declare module 'ol-ext/interaction/Transform' { import type Feature from 'ol/Feature'; import type Collection from 'ol/Collection'; import type BaseLayer from 'ol/layer/Base'; import PointerInteraction from 'ol/interaction/Pointer'; interface TransformOptions { layers?: BaseLayer[] | BaseLayer; features?: Collection; filter?: (feature: Feature, layer: BaseLayer) => boolean; hitTolerance?: number; translate?: boolean; translateFeature?: boolean; translateBBox?: boolean; stretch?: boolean; scale?: boolean; rotate?: boolean; selection?: boolean; pointRadius?: number | number[] | ((feature: Feature) => number | number[]); style?: unknown; } /** Events: select, translatestart | translating | translateend, scale*, rotate*. */ export interface TransformEvent { type: string; feature?: Feature; features?: Collection; /** `translating` only: [deltaX, deltaY] in map units (EPSG:3857 here). */ delta?: [number, number]; coordinate?: [number, number]; pixel?: [number, number]; /** `*end` only. */ transformed?: boolean; } /** * ol-ext's custom event names are not in OpenLayers' event-type unions, so * overriding `on` / `un` on the class would clash with `Interaction` and break * `map.addInteraction()`. Consumers narrow through this interface instead — * one documented conversion rather than a cast at every listener. */ export interface TransformEvents { on(type: string, listener: (event: TransformEvent) => void): void; un(type: string, listener: (event: TransformEvent) => void): void; } export default class Transform extends PointerInteraction { constructor(options?: TransformOptions); select(feature: Feature | null, add?: boolean): void; } }